Dot MatrixPRO
A grid of glowing dots driven by six motion patterns (signal, ripple, pulse, spiral, firing, accelerating) in any color.
Code
2 files · 389 lines of TypeScriptPRO
Dot Matrix is part of Pro
Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.
Motion notes
- Every pattern is a field: one function from a dot's position and the time to an intensity. Intensity drives size, opacity and glow together, so a single number reads as brightness, like an LED panel.
- Each motion borrows from something real. Signal is an audio meter whose peak dots hang, then fall under gravity. Ripple drops raindrops at random spots and their rings interfere. Pulse is a heart monitor drawing one beat with a phosphor trail. Spiral is a two-armed galaxy around a breathing core. Firing sends a spike hopping outward from a neuron, with some neighbours staying quiet. Accelerating is a binary inspiral: two bodies circle ever faster until they merge in a flash and a ring.
- Sub-dot detail survives the coarse grid: meter bars light their top dot fractionally, and the ECG spike lights the full span it covers inside a column, so motion stays smooth at 9×9.
- Color is a prop: a preset, the theme ink, a hue that drifts across the grid, any CSS color or token, or two colors blended corner to corner. Presets carry a pastel for dark screens and a deeper shade for paper.
- On dark screens the hottest dots bloom toward white and get an additive glow in their own hue, so clusters brighten together instead of greying out. Light screens skip the glow, which would read as a smudge.
- Leave size out and the canvas fills its container. 2D canvas, drawn only while on screen; reduced motion shows a hand-picked still per pattern.
Usage
Example
<DotMatrix pattern="ripple" color="violet" size={96} />
<DotMatrix pattern="accelerating" color={["blue", "violet"]} size={96} />
<div className="w-40"><DotMatrix pattern="spiral" color="spectrum" /></div>
<StatusPill icon={<DotMatrix pattern="pulse" color="rose" size={22} grid={7} />} label="Monitoring" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| pattern | "signal" | "ripple" | "pulse" | "spiral" | "firing" | "accelerating" | "signal" | The motion. |
| color | string | [string, string] | "cyan" | A preset ("cyan", "blue", "violet", "rose", "amber", "lime"), "ink", "spectrum", any CSS color, or a CSS variable name like "--text-brand". Pass two to blend corner to corner. |
| size | number | — | Size in px. Leave it out to fill the parent's width as a square. |
| grid | number | 9 | Dots per side. Use 6–7 at pill size. |
| speed | number | 1 | Playback multiplier. |
| className | string | — | Classes for the canvas. |