A field of fine glints drifting past, flashing as they catch the light
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#FFFFFF", "#B19EEF"] | Two colours each glint is tinted between, blended in OKLab. On light backgrounds they turn into matching inks automatically. |
backgroundColor | string | "transparent" | Background of the component. Transparent reads the colour behind the component. |
count | number | 1500 | Number of glints in the field, up to 9000. |
size | number | 1.6 | Size of a glint in pixels at the middle of the field. |
sizeVariance | number | 0.6 | How much glint sizes vary. |
brightness | number | 1 | Overall brightness of the field. |
spread | number | 1 | Width of the field around the centre. |
hollow | number | 0.06 | Size of the empty core around the centre, from 0 (filled) to 0.95 (a tunnel). Keeps the middle clear for content. |
perspective | number | 0.7 | Depth of the field. Higher values fling near glints wider and faster. |
centerX | number | 0.5 | Horizontal position of the vanishing point, as a fraction of the width. |
centerY | number | 0.5 | Vertical position of the vanishing point. Above the frame gives falling snow; below it, glints rising from a horizon. |
speed | number | 0.5 | Speed of travel through the field. 0 holds still. |
direction | "outward" | "inward" | "outward" | Fly into the field, or drift backwards out of it. |
twist | number | 0 | Spiral twist of the field with depth. Negative values twist the other way. |
turbulence | number | 0 | Gentle wobble in each glint's path. |
trail | number | 0.08 | Shutter length for motion streaks. Streaks grow with speed, so warp boosts stretch them out. |
glitter | number | 0.5 | How often glints catch the light and flash into four-point stars. 0 turns flashes off. |
glintSize | number | 1 | Length of the four-point flash. |
twinkle | number | 0.5 | Gentle brightness shimmer of every glint. |
focus | number | 0.62 | Depth that is in sharp focus, from 0 (nearest) to 1 (farthest). |
aperture | number | 0.45 | Depth of field. Higher values turn out-of-focus glints into soft bokeh. |
boost | number | 7 | Speed multiplier while the pointer is held down, a short jump to warp. 1 turns it off. |
parallax | number | 0.5 | How far the view turns toward the pointer, so near glints shift more than far ones. |
waves | boolean | true | Click or tap to send a wave of light through the field, catching glints as it passes. |
intro | boolean | true | Arrive out of warp: the field fades in at speed and settles to its cruising pace. |
paused | boolean | false | Stops the motion. Reduced-motion users get a still field without flashes. |
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 send waves. |
ref | { wave, warp, replay } | — | wave(x?, y?) sends a wave from a position given in fractions of the size; warp(seconds?) boosts for a moment; 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 each glint is tinted between, blended in OKLab. On light backgrounds they turn into matching inks automatically.
["#FFFFFF", "#B19EEF"]backgroundColorstringBackground of the component. Transparent reads the colour behind the component.
"transparent"countnumberNumber of glints in the field, up to 9000.
1500sizenumberSize of a glint in pixels at the middle of the field.
1.6sizeVariancenumberHow much glint sizes vary.
0.6brightnessnumberOverall brightness of the field.
1spreadnumberWidth of the field around the centre.
1hollownumberSize of the empty core around the centre, from 0 (filled) to 0.95 (a tunnel). Keeps the middle clear for content.
0.06perspectivenumberDepth of the field. Higher values fling near glints wider and faster.
0.7centerXnumberHorizontal position of the vanishing point, as a fraction of the width.
0.5centerYnumberVertical position of the vanishing point. Above the frame gives falling snow; below it, glints rising from a horizon.
0.5speednumberSpeed of travel through the field. 0 holds still.
0.5direction"outward" | "inward"Fly into the field, or drift backwards out of it.
"outward"twistnumberSpiral twist of the field with depth. Negative values twist the other way.
0turbulencenumberGentle wobble in each glint's path.
0trailnumberShutter length for motion streaks. Streaks grow with speed, so warp boosts stretch them out.
0.08glitternumberHow often glints catch the light and flash into four-point stars. 0 turns flashes off.
0.5glintSizenumberLength of the four-point flash.
1twinklenumberGentle brightness shimmer of every glint.
0.5focusnumberDepth that is in sharp focus, from 0 (nearest) to 1 (farthest).
0.62aperturenumberDepth of field. Higher values turn out-of-focus glints into soft bokeh.
0.45boostnumberSpeed multiplier while the pointer is held down, a short jump to warp. 1 turns it off.
7parallaxnumberHow far the view turns toward the pointer, so near glints shift more than far ones.
0.5wavesbooleanClick or tap to send a wave of light through the field, catching glints as it passes.
trueintrobooleanArrive out of warp: the field fades in at speed and settles to its cruising pace.
truepausedbooleanStops the motion. Reduced-motion users get a still field without flashes.
falsedprnumberMaximum device pixel ratio for the canvas.
2childrenReactNodeContent laid over the field, such as a hero headline. Clicks on its links and buttons never send waves.
—ref{ wave, warp, replay }wave(x?, y?) sends a wave from a position given in fractions of the size; warp(seconds?) boosts for a moment; replay() replays the intro.
—classNamestringClasses for the root element. It fills its parent, with a 320px minimum height.
—styleCSSPropertiesInline styles for the root element.
—