- Docs
- Components
- Backgrounds
- Dots & Pixels
- Dotted Waves
A grid of dots rising and falling in rolling waves
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#5227FF", "#B19EEF"] | Back and front colours. Dots blend between them in OKLab, so the second colour marks the dots closest to you. On light backgrounds put the darker colour second. |
backgroundColor | string | "#0a0a0a" | Colour of the root element behind the dots. The dots draw on a transparent canvas, so any value works, including transparent. |
pattern | "noise" | "wave" | "rings" | "spiral" | "noise" | How the waves are laid out: organic noise swells, straight wave fronts, concentric rings or a spiral with a set number of arms. |
spacing | number | 20 | Distance between dots in pixels. |
size | number | 4 | Radius of a dot at the crest of its wave, in pixels. |
jump | number | 3 | How far each dot rises and falls, measured in rows. 0 keeps dots in place so only their size pulses. |
speed | number | 0.25 | Wave cycles per second. Negative values run the motion in reverse. |
frequency | number | 0.08 | How tightly the waves pack together. Lower values make broad, calm swells. |
turbulence | number | 0.25 | Extra fine noise mixed into the wave shapes, from 0 to 2. |
drift | number | 0.06 | How fast the noise field itself slides along the direction, so the swells travel across the field. |
direction | number | 0 | Direction of travel in degrees for wave fronts and drift. |
arms | number | 2 | Number of arms in the "spiral" pattern, from 1 to 12. |
shrink | number | 1 | How much dots shrink in the trough of their wave. 1 lets them vanish completely, 0 keeps every dot full size. |
depth | number | 0.5 | How much dots fade in the back half of their cycle, which adds a sense of depth. |
shape | "circle" | "ring" | "square" | "diamond" | "circle" | Shape of each dot. Squares and diamonds follow the grid rotation. |
stagger | boolean | false | Offset every other row by half a cell for a honeycomb grid. |
rotation | number | 0 | Rotation of the dot grid in degrees. |
tilt | number | 0 | Tilts the grid back into perspective, from 0 to 80 degrees, so it reads as a surface running to the horizon. |
perspective | number | 1.2 | Camera distance for the tilted view, relative to the larger side. Lower values exaggerate the depth. |
centerX | number | 0 | Horizontal position of the grid origin, from -1 (left edge) to 1 (right edge). Rings and spirals radiate from it. |
centerY | number | 0 | Vertical position of the grid origin, from -1 (top) to 1 (bottom). With a tilt, moving it down raises the horizon. |
colorBy | "depth" | "height" | "position" | "random" | "depth" | What picks each dot's colour: its place in the wave cycle, its height, its position across the frame, or a fixed random mix. |
glow | number | 0 | Soft halo around each dot, from 0 to 1. |
softness | number | 0 | Blurs dot edges, from crisp (0) to soft (1). |
opacity | number | 1 | Overall opacity of the dots, from 0 to 1. |
fade | number | 0 | Fades the dots towards the edges of the frame, from 0 to 1. |
interactive | boolean | true | Respond to the pointer and to touch. |
wake | number | 1 | Strength of the ripples left behind as the pointer or a finger moves through the dots. Faster movement makes bigger ripples. 0 turns it off. |
splash | number | 1 | Strength of the wave that rolls out from a click or tap. Each one fires its own wave. 0 turns it off. |
rippleSpeed | number | 10 | How fast ripples travel, in rows per second. |
paused | boolean | false | Freeze the motion. Users who prefer reduced motion always get a still frame. |
quality | number | 1 | Render resolution from 0.25 to 1. Lower values are cheaper on very large screens. |
ref | { splash } | — | splash(x, y) rolls out a wave from code, with x and y from 0 to 1 across the frame (the centre by default). |
children | ReactNode | — | Content placed over the dots. |
className | string | — | Classes for the root element. It fills its parent, with a 240px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]Back and front colours. Dots blend between them in OKLab, so the second colour marks the dots closest to you. On light backgrounds put the darker colour second.
["#5227FF", "#B19EEF"]backgroundColorstringColour of the root element behind the dots. The dots draw on a transparent canvas, so any value works, including transparent.
"#0a0a0a"pattern"noise" | "wave" | "rings" | "spiral"How the waves are laid out: organic noise swells, straight wave fronts, concentric rings or a spiral with a set number of arms.
"noise"spacingnumberDistance between dots in pixels.
20sizenumberRadius of a dot at the crest of its wave, in pixels.
4jumpnumberHow far each dot rises and falls, measured in rows. 0 keeps dots in place so only their size pulses.
3speednumberWave cycles per second. Negative values run the motion in reverse.
0.25frequencynumberHow tightly the waves pack together. Lower values make broad, calm swells.
0.08turbulencenumberExtra fine noise mixed into the wave shapes, from 0 to 2.
0.25driftnumberHow fast the noise field itself slides along the direction, so the swells travel across the field.
0.06directionnumberDirection of travel in degrees for wave fronts and drift.
0armsnumberNumber of arms in the "spiral" pattern, from 1 to 12.
2shrinknumberHow much dots shrink in the trough of their wave. 1 lets them vanish completely, 0 keeps every dot full size.
1depthnumberHow much dots fade in the back half of their cycle, which adds a sense of depth.
0.5shape"circle" | "ring" | "square" | "diamond"Shape of each dot. Squares and diamonds follow the grid rotation.
"circle"staggerbooleanOffset every other row by half a cell for a honeycomb grid.
falserotationnumberRotation of the dot grid in degrees.
0tiltnumberTilts the grid back into perspective, from 0 to 80 degrees, so it reads as a surface running to the horizon.
0perspectivenumberCamera distance for the tilted view, relative to the larger side. Lower values exaggerate the depth.
1.2centerXnumberHorizontal position of the grid origin, from -1 (left edge) to 1 (right edge). Rings and spirals radiate from it.
0centerYnumberVertical position of the grid origin, from -1 (top) to 1 (bottom). With a tilt, moving it down raises the horizon.
0colorBy"depth" | "height" | "position" | "random"What picks each dot's colour: its place in the wave cycle, its height, its position across the frame, or a fixed random mix.
"depth"glownumberSoft halo around each dot, from 0 to 1.
0softnessnumberBlurs dot edges, from crisp (0) to soft (1).
0opacitynumberOverall opacity of the dots, from 0 to 1.
1fadenumberFades the dots towards the edges of the frame, from 0 to 1.
0interactivebooleanRespond to the pointer and to touch.
truewakenumberStrength of the ripples left behind as the pointer or a finger moves through the dots. Faster movement makes bigger ripples. 0 turns it off.
1splashnumberStrength of the wave that rolls out from a click or tap. Each one fires its own wave. 0 turns it off.
1rippleSpeednumberHow fast ripples travel, in rows per second.
10pausedbooleanFreeze the motion. Users who prefer reduced motion always get a still frame.
falsequalitynumberRender resolution from 0.25 to 1. Lower values are cheaper on very large screens.
1ref{ splash }splash(x, y) rolls out a wave from code, with x and y from 0 to 1 across the frame (the centre by default).
—childrenReactNodeContent placed over the dots.
—classNamestringClasses for the root element. It fills its parent, with a 240px minimum height.
—styleCSSPropertiesInline styles for the root element.
—