Currents of light flowing across a grid of glowing dots
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#5227FF", "#FF9FFC"] | Two colours the currents are tinted between, blended in OKLab and drifting slowly along each stream. On light backgrounds they become matching inks. |
backgroundColor | string | "transparent" | Background of the component. Transparent reads the colour behind the component. |
pattern | "streams" | "waves" | "vortex" | "radial" | "contours" | "streams" | Shape of the flow: meandering currents, clean sine waves, a spiral whirlpool, rays fanning out from a point, or the moving contour lines of a landscape. |
scale | number | 1 | Size of the pattern: the wavelength of waves, the tightness of the spiral, or the size of contour shapes. |
centerX | number | 0.5 | Horizontal centre of the vortex and radial patterns, as a fraction of the width. Values outside 0 to 1 place it off-frame. |
centerY | number | 0.5 | Vertical centre of the vortex and radial patterns, as a fraction of the height from the top. 1.2 rises rays from below the frame. |
pitch | number | 8 | Distance between dots in pixels. |
dotSize | number | 0.62 | Size of a fully lit dot as a share of the pitch. |
variance | number | 0.35 | How much a dot's size follows its brightness: 0 keeps every dot the same size like an LED panel, 1 gives a halftone. |
shape | "circle" | "square" | "circle" | Shape of each dot. |
baseDots | number | 0.12 | Faint unlit dots across the whole grid, so the matrix reads even where no current flows. |
stretch | number | 0.2 | How much bright dots stretch along the direction of the flow, like a slight motion blur. |
streams | number | 4 | Number of currents, waves, spiral arms, rays or contour levels, from 1 to 16. |
spread | number | 0.5 | Width of each current. |
speed | number | 0.6 | How fast the currents flow. 0 holds them still. |
direction | number | 0 | Direction of the flow in degrees for streams and waves: 0 flows to the right, 90 rises. For vortex and contours, negative values reverse the spin. |
turbulence | number | 0.6 | How much the currents meander and curl. |
trail | number | 0.6 | How long the light lingers behind the moving particles. Higher values give smoother, longer streams. |
intensity | number | 1 | Brightness of the currents. |
bloom | number | 0.6 | Soft glow around the brightest dots on dark backgrounds. |
grain | number | 0.2 | Fine film grain over the lit areas. |
interactive | boolean | true | Moving the pointer stirs the currents like a hand through water; clicking or tapping releases a puff of dye. |
stir | number | 1 | How strongly the pointer stirs the flow. |
plume | number | 1 | Amount of dye a click releases. 0 turns it off. |
intro | boolean | true | The currents fade in as they start flowing when the component first appears. |
paused | boolean | false | Stops the motion. Reduced-motion users get still currents. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
children | ReactNode | — | Content laid over the currents, such as a hero headline. Clicks on its links and buttons never release dye. |
ref | { plume, replay } | — | plume(x?, y?, strength?) releases dye at a point given in fractions of the size; replay() replays the intro. |
className | string | — | Classes for the root element. It fills its parent, with a 320px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]Two colours the currents are tinted between, blended in OKLab and drifting slowly along each stream. On light backgrounds they become matching inks.
["#5227FF", "#FF9FFC"]backgroundColorstringBackground of the component. Transparent reads the colour behind the component.
"transparent"pattern"streams" | "waves" | "vortex" | "radial" | "contours"Shape of the flow: meandering currents, clean sine waves, a spiral whirlpool, rays fanning out from a point, or the moving contour lines of a landscape.
"streams"scalenumberSize of the pattern: the wavelength of waves, the tightness of the spiral, or the size of contour shapes.
1centerXnumberHorizontal centre of the vortex and radial patterns, as a fraction of the width. Values outside 0 to 1 place it off-frame.
0.5centerYnumberVertical centre of the vortex and radial patterns, as a fraction of the height from the top. 1.2 rises rays from below the frame.
0.5pitchnumberDistance between dots in pixels.
8dotSizenumberSize of a fully lit dot as a share of the pitch.
0.62variancenumberHow much a dot's size follows its brightness: 0 keeps every dot the same size like an LED panel, 1 gives a halftone.
0.35shape"circle" | "square"Shape of each dot.
"circle"baseDotsnumberFaint unlit dots across the whole grid, so the matrix reads even where no current flows.
0.12stretchnumberHow much bright dots stretch along the direction of the flow, like a slight motion blur.
0.2streamsnumberNumber of currents, waves, spiral arms, rays or contour levels, from 1 to 16.
4spreadnumberWidth of each current.
0.5speednumberHow fast the currents flow. 0 holds them still.
0.6directionnumberDirection of the flow in degrees for streams and waves: 0 flows to the right, 90 rises. For vortex and contours, negative values reverse the spin.
0turbulencenumberHow much the currents meander and curl.
0.6trailnumberHow long the light lingers behind the moving particles. Higher values give smoother, longer streams.
0.6intensitynumberBrightness of the currents.
1bloomnumberSoft glow around the brightest dots on dark backgrounds.
0.6grainnumberFine film grain over the lit areas.
0.2interactivebooleanMoving the pointer stirs the currents like a hand through water; clicking or tapping releases a puff of dye.
truestirnumberHow strongly the pointer stirs the flow.
1plumenumberAmount of dye a click releases. 0 turns it off.
1introbooleanThe currents fade in as they start flowing when the component first appears.
truepausedbooleanStops the motion. Reduced-motion users get still currents.
falsedprnumberMaximum device pixel ratio for the canvas.
2childrenReactNodeContent laid over the currents, such as a hero headline. Clicks on its links and buttons never release dye.
—ref{ plume, replay }plume(x?, y?, strength?) releases dye at a point given in fractions of the size; replay() replays the intro.
—classNamestringClasses for the root element. It fills its parent, with a 320px minimum height.
—styleCSSPropertiesInline styles for the root element.
—