Fine dust carried on a fluid wake behind the cursor, with a mushroom puff on click
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#FF9FFC", "#8B5CF6"] | The two colours the dust drifts between along each stroke, blended in OKLab. Accepts any CSS colour, including currentColor. |
blend | "light" | "ink" | "light" | light draws bright dust for dark pages. ink draws dark dust with normal transparency for light pages. |
shape | "round" | "square" | "round" | Shape of each grain of dust. |
dotSize | number | 2.4 | Diameter of a grain in pixels where the cloud is dense. Thin parts of the cloud use smaller grains. |
sizeVariance | number | 0.4 | Random variation in grain size, from 0 (all the same) to 1. |
density | number | 1.4 | How tightly the grains are packed. Higher values use more, closer grains. |
spread | number | 64 | Radius of a fresh stroke in pixels. The cloud billows wider as it flows. |
grain | number | 0.7 | Streaks brushed into fresh dust along the stroke, from 0 (an even cloud) to 1. |
cycle | number | 900 | Pixels of pointer travel for the dust to drift from the first colour to the second. It then drifts back. |
life | number | 2.4 | Seconds until a stroke has dissolved completely. |
softness | number | 0.16 | How gradually each grain fades as the dust thins out, from 0.01 (grains switch off) to 1 (a slow, soft dissolve). |
highlight | number | 0.3 | How much fresh dust is lifted toward white before it settles. In ink mode it deepens toward ink instead. |
echo | number | 0.45 | Strength of the offset shadow behind each grain, which gives the cloud depth. 0 turns it off. |
echoOffset | number | 1.5 | Offset of that shadow in pixels. |
force | number | 1 | How hard the pointer pushes the air. Higher values fling the dust further along the stroke. |
radius | number | 80 | Radius in pixels of the air the pointer moves. |
swirl | number | 0.5 | How strongly the wake curls into eddies. |
turbulence | number | 0.6 | Slow, broad turbulence in the wake that makes the dust billow. |
momentum | number | 1 | How long the air keeps moving after the pointer stops. |
drift | number | 1 | A slow wander of the grains inside the cloud. |
wind | number | 0 | A steady breeze that carries the dust away, in steps of 40px per second. |
windAngle | number | -90 | Direction of the breeze in degrees. 0 blows to the right, -90 blows up. |
opacity | number | 1 | Overall opacity of the dust, from 0 to 1. |
puff | boolean | true | Click or tap to fire a puff of dust that rolls up into a mushroom cloud. It follows the stroke direction and turns inward near an edge. |
puffSize | number | 1 | Size of the puff. |
puffForce | number | 1 | How far and fast the puff travels. |
maxParticles | number | 160000 | Upper limit on the number of grains. On very large screens the grains spread out to stay under it. |
autoplay | boolean | false | Sweep strokes across the component on its own while the pointer is away, with the odd puff. The pointer takes over the moment it enters. |
autoplaySpeed | number | 1 | Speed multiplier for autoplay. |
idleDelay | number | 1.5 | Seconds after the pointer leaves before autoplay resumes. |
intro | boolean | true | Sweep one stroke across, ending in a puff, the first time the component scrolls into view. With autoplay on, strokes flow in from the edge instead. |
interactive | boolean | true | Follow the visitor's pointer. Turn it off to show only autoplay and scripted puffs. |
disabled | boolean | false | Stop painting and ignore input. Dust already on screen dissolves. |
quality | number | 1 | Render scale from 0.5 to 1. Lower values reduce the canvas and fluid resolution for slower devices. |
ref | { puff, clear } | — | puff(x?, y?, angle?) fires a puff at a point in pixels, with an optional angle in degrees (it defaults to the stroke direction). clear() removes all dust. |
children | ReactNode | — | Content the dust drifts over. |
className | string | — | Classes for the root element. It fills its parent and is at least 240px tall. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]The two colours the dust drifts between along each stroke, blended in OKLab. Accepts any CSS colour, including currentColor.
["#FF9FFC", "#8B5CF6"]blend"light" | "ink"light draws bright dust for dark pages. ink draws dark dust with normal transparency for light pages.
"light"shape"round" | "square"Shape of each grain of dust.
"round"dotSizenumberDiameter of a grain in pixels where the cloud is dense. Thin parts of the cloud use smaller grains.
2.4sizeVariancenumberRandom variation in grain size, from 0 (all the same) to 1.
0.4densitynumberHow tightly the grains are packed. Higher values use more, closer grains.
1.4spreadnumberRadius of a fresh stroke in pixels. The cloud billows wider as it flows.
64grainnumberStreaks brushed into fresh dust along the stroke, from 0 (an even cloud) to 1.
0.7cyclenumberPixels of pointer travel for the dust to drift from the first colour to the second. It then drifts back.
900lifenumberSeconds until a stroke has dissolved completely.
2.4softnessnumberHow gradually each grain fades as the dust thins out, from 0.01 (grains switch off) to 1 (a slow, soft dissolve).
0.16highlightnumberHow much fresh dust is lifted toward white before it settles. In ink mode it deepens toward ink instead.
0.3echonumberStrength of the offset shadow behind each grain, which gives the cloud depth. 0 turns it off.
0.45echoOffsetnumberOffset of that shadow in pixels.
1.5forcenumberHow hard the pointer pushes the air. Higher values fling the dust further along the stroke.
1radiusnumberRadius in pixels of the air the pointer moves.
80swirlnumberHow strongly the wake curls into eddies.
0.5turbulencenumberSlow, broad turbulence in the wake that makes the dust billow.
0.6momentumnumberHow long the air keeps moving after the pointer stops.
1driftnumberA slow wander of the grains inside the cloud.
1windnumberA steady breeze that carries the dust away, in steps of 40px per second.
0windAnglenumberDirection of the breeze in degrees. 0 blows to the right, -90 blows up.
-90opacitynumberOverall opacity of the dust, from 0 to 1.
1puffbooleanClick or tap to fire a puff of dust that rolls up into a mushroom cloud. It follows the stroke direction and turns inward near an edge.
truepuffSizenumberSize of the puff.
1puffForcenumberHow far and fast the puff travels.
1maxParticlesnumberUpper limit on the number of grains. On very large screens the grains spread out to stay under it.
160000autoplaybooleanSweep strokes across the component on its own while the pointer is away, with the odd puff. The pointer takes over the moment it enters.
falseautoplaySpeednumberSpeed multiplier for autoplay.
1idleDelaynumberSeconds after the pointer leaves before autoplay resumes.
1.5introbooleanSweep one stroke across, ending in a puff, the first time the component scrolls into view. With autoplay on, strokes flow in from the edge instead.
trueinteractivebooleanFollow the visitor's pointer. Turn it off to show only autoplay and scripted puffs.
truedisabledbooleanStop painting and ignore input. Dust already on screen dissolves.
falsequalitynumberRender scale from 0.5 to 1. Lower values reduce the canvas and fluid resolution for slower devices.
1ref{ puff, clear }puff(x?, y?, angle?) fires a puff at a point in pixels, with an optional angle in degrees (it defaults to the stroke direction). clear() removes all dust.
—childrenReactNodeContent the dust drifts over.
—classNamestringClasses for the root element. It fills its parent and is at least 240px tall.
—styleCSSPropertiesInline styles for the root element.
—