A curved horizon of square voxels rolling like a calm sea
| Name | Type | Default | Description |
|---|---|---|---|
color | string | "#5227FF" | Colour of the voxel field in the troughs and the distance. |
accentColor | string | "#B19EEF" | Colour the crests and the horizon light up in. Both colours become matching inks on light backgrounds. |
backgroundColor | string | "transparent" | Background of the component. Transparent reads the colour behind the component. |
density | number | 1 | How many voxels make up the field. Higher values give finer pixels. |
voxelSize | number | 0.55 | Size of each voxel as a share of the grid spacing. |
roundness | number | 0.2 | Corner rounding, from 0 (square pixels) to 1 (round dots). |
tilt | number | 1 | How flat the voxels lie on the surface. 1 lies them on the waves in perspective; 0 turns them to face the viewer. |
horizon | number | 0.56 | Height of the horizon as a fraction of the frame, from the top. |
curvature | number | 0.5 | How much the horizon curves away at the sides, from 0 (flat) to 1.5 (a planet's limb). |
waveHeight | number | 1 | Height of the rolling waves. 0 gives a still, flat field. |
waveLength | number | 1 | Length of the waves. Lower values give a choppier surface. |
speed | number | 0.5 | How fast the waves roll in. 0 holds the field still. |
turbulence | number | 0.4 | Amount of smaller, crossing waves riding on the swell. |
brightness | number | 1 | Overall brightness of the voxels. |
glow | number | 1 | Light along the horizon, so the far edge of the field reads as a glowing arc. |
haze | number | 0.7 | Soft atmosphere hugging the horizon. 0 keeps the sky the page colour. |
bloom | number | 0.5 | Soft glow around the brightest voxels on dark backgrounds. |
focus | number | 0.25 | Distance that is in sharp focus, from 0 (the nearest voxels) to 1 (the horizon). |
aperture | number | 0.35 | Depth of field. Higher values soften voxels away from the focus into haze. |
grain | number | 0.25 | Fine film grain over the lit areas. |
interactive | boolean | true | Moving the pointer over the field leaves a wake; clicking or tapping drops a ripple into it. |
ripples | number | 1 | Strength of the wake and the ripples. |
intro | boolean | true | Light comes up from the horizon toward the viewer when the field first appears. |
paused | boolean | false | Stops the motion. Reduced-motion users get a still field. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
children | ReactNode | — | Content laid over the field, such as a hero headline. Clicks on its links and buttons never drop ripples. |
ref | { ripple, replay } | — | ripple(x?, y?, strength?) drops a ripple 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. |
colorstringColour of the voxel field in the troughs and the distance.
"#5227FF"accentColorstringColour the crests and the horizon light up in. Both colours become matching inks on light backgrounds.
"#B19EEF"backgroundColorstringBackground of the component. Transparent reads the colour behind the component.
"transparent"densitynumberHow many voxels make up the field. Higher values give finer pixels.
1voxelSizenumberSize of each voxel as a share of the grid spacing.
0.55roundnessnumberCorner rounding, from 0 (square pixels) to 1 (round dots).
0.2tiltnumberHow flat the voxels lie on the surface. 1 lies them on the waves in perspective; 0 turns them to face the viewer.
1horizonnumberHeight of the horizon as a fraction of the frame, from the top.
0.56curvaturenumberHow much the horizon curves away at the sides, from 0 (flat) to 1.5 (a planet's limb).
0.5waveHeightnumberHeight of the rolling waves. 0 gives a still, flat field.
1waveLengthnumberLength of the waves. Lower values give a choppier surface.
1speednumberHow fast the waves roll in. 0 holds the field still.
0.5turbulencenumberAmount of smaller, crossing waves riding on the swell.
0.4brightnessnumberOverall brightness of the voxels.
1glownumberLight along the horizon, so the far edge of the field reads as a glowing arc.
1hazenumberSoft atmosphere hugging the horizon. 0 keeps the sky the page colour.
0.7bloomnumberSoft glow around the brightest voxels on dark backgrounds.
0.5focusnumberDistance that is in sharp focus, from 0 (the nearest voxels) to 1 (the horizon).
0.25aperturenumberDepth of field. Higher values soften voxels away from the focus into haze.
0.35grainnumberFine film grain over the lit areas.
0.25interactivebooleanMoving the pointer over the field leaves a wake; clicking or tapping drops a ripple into it.
trueripplesnumberStrength of the wake and the ripples.
1introbooleanLight comes up from the horizon toward the viewer when the field first appears.
truepausedbooleanStops the motion. Reduced-motion users get a still field.
falsedprnumberMaximum device pixel ratio for the canvas.
2childrenReactNodeContent laid over the field, such as a hero headline. Clicks on its links and buttons never drop ripples.
—ref{ ripple, replay }ripple(x?, y?, strength?) drops a ripple 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.
—