- Docs
- Components
- Backgrounds
- Square Matrix
A crisp LED grid rippling in waves of light
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#FF00FF", "#9A2BFF"] | The two colours the grid blends between, from the origin outward. The hottest cores burn towards white. On light backgrounds they become matching inks. |
backgroundColor | string | "transparent" | Background of the component. Transparent shows the page behind it and picks the light or dark look from it. |
pattern | "ripple" | "diagonal" | "horizontal" | "vertical" | "spiral" | "checker" | "noise" | "scan" | "ripple" | How the wave travels: rings from the origin, straight bands, a spiral, a checkerboard, slow organic patches, or a single sweep with a soft trail. |
gridSize | number | 10 | Grid density. The frame is twice this many cells tall. |
cellSize | number | undefined | Fixed distance between cells in pixels. Overrides gridSize when set. |
gap | number | 0.26 | Space between the lights, as a share of the cell, from 0 to 0.95. |
roundness | number | 0.35 | Corner rounding of each light, from 0 (square) to 1 (round). |
glow | number | 0.7 | Halo and bloom around the lit cells, from 0 to 2. Bright crests bleed light into their neighbours. |
speed | number | 1 | Speed of the wave. 0 holds it still. |
waveScale | number | 1 | Size of the waves. Larger values make wider rings and bands. |
amplitude | number | 0.18 | How much the lights swell on the crests and settle in the troughs, from 0 to 1. |
contrast | number | 1 | How dark the troughs get, from 0 (every cell lit) to 1 (only the unlit panel shows). |
peakBrightness | number | 2 | Brightness of the crests. Higher values push the hottest cores towards white. |
baseBrightness | number | 0 | Extra light on every cell, troughs included. |
angle | number | 0 | Turns the diagonal, horizontal, vertical and scan patterns, in degrees. |
originX | number | 0.5 | Where the waves start, as a share of the width. The intro cascades out from here too. |
originY | number | 0.5 | Where the waves start, as a share of the height. |
wake | number | 1 | How deeply the pointer presses the cells it passes and how long they take to spring back, from 0 to 2. |
rippleStrength | number | 1 | Strength of the ripple a click sends out, from 0 to 2. |
interactive | boolean | true | Cells under the pointer sink and flare like pressed keys, then spring back. A click sends a ripple from that cell. Clicks stack. |
intro | boolean | true | The cells cascade in from the origin when the component appears. |
paused | boolean | false | Holds the wave still. The pointer still presses cells. Reduced-motion users get a still grid. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
opacity | number | 1 | Overall opacity of the grid, from 0 to 1. |
width | string | number | "100%" | Width of the component. |
height | string | number | "100%" | Height of the component. |
children | ReactNode | undefined | Content laid over the grid. Clicks on its links and buttons never send a ripple. |
ref | { ripple, replay } | undefined | ripple(x?, y?, strength?) sends a ripple from a point given as shares of the frame. replay() plays the intro again. |
className | string | undefined | Classes for the root element. |
style | CSSProperties | undefined | Inline styles for the root element. |
colors[string, string]The two colours the grid blends between, from the origin outward. The hottest cores burn towards white. On light backgrounds they become matching inks.
["#FF00FF", "#9A2BFF"]backgroundColorstringBackground of the component. Transparent shows the page behind it and picks the light or dark look from it.
"transparent"pattern"ripple" | "diagonal" | "horizontal" | "vertical" | "spiral" | "checker" | "noise" | "scan"How the wave travels: rings from the origin, straight bands, a spiral, a checkerboard, slow organic patches, or a single sweep with a soft trail.
"ripple"gridSizenumberGrid density. The frame is twice this many cells tall.
10cellSizenumberFixed distance between cells in pixels. Overrides gridSize when set.
undefinedgapnumberSpace between the lights, as a share of the cell, from 0 to 0.95.
0.26roundnessnumberCorner rounding of each light, from 0 (square) to 1 (round).
0.35glownumberHalo and bloom around the lit cells, from 0 to 2. Bright crests bleed light into their neighbours.
0.7speednumberSpeed of the wave. 0 holds it still.
1waveScalenumberSize of the waves. Larger values make wider rings and bands.
1amplitudenumberHow much the lights swell on the crests and settle in the troughs, from 0 to 1.
0.18contrastnumberHow dark the troughs get, from 0 (every cell lit) to 1 (only the unlit panel shows).
1peakBrightnessnumberBrightness of the crests. Higher values push the hottest cores towards white.
2baseBrightnessnumberExtra light on every cell, troughs included.
0anglenumberTurns the diagonal, horizontal, vertical and scan patterns, in degrees.
0originXnumberWhere the waves start, as a share of the width. The intro cascades out from here too.
0.5originYnumberWhere the waves start, as a share of the height.
0.5wakenumberHow deeply the pointer presses the cells it passes and how long they take to spring back, from 0 to 2.
1rippleStrengthnumberStrength of the ripple a click sends out, from 0 to 2.
1interactivebooleanCells under the pointer sink and flare like pressed keys, then spring back. A click sends a ripple from that cell. Clicks stack.
trueintrobooleanThe cells cascade in from the origin when the component appears.
truepausedbooleanHolds the wave still. The pointer still presses cells. Reduced-motion users get a still grid.
falsedprnumberMaximum device pixel ratio for the canvas.
2opacitynumberOverall opacity of the grid, from 0 to 1.
1widthstring | numberWidth of the component.
"100%"heightstring | numberHeight of the component.
"100%"childrenReactNodeContent laid over the grid. Clicks on its links and buttons never send a ripple.
undefinedref{ ripple, replay }ripple(x?, y?, strength?) sends a ripple from a point given as shares of the frame. replay() plays the intro again.
undefinedclassNamestringClasses for the root element.
undefinedstyleCSSPropertiesInline styles for the root element.
undefined