Words that condense out of vapor and drift away
| Name | Type | Default | Description |
|---|---|---|---|
words | string[] | ["Imagine", "Create", "Inspire"] | Words or short phrases to cycle through. Each one condenses in place of the last. |
as | "span" | "div" | "p" | "h1" | … | "h6" | "span" | Element to render. The component inherits font, size and weight from its parent and reserves room for the longest word. |
align | "start" | "center" | "end" | "center" | How shorter words sit inside the space reserved for the longest one. |
color | string | "currentColor" | Colour of the lettering. Defaults to the surrounding text colour. |
vaporColor | string | "#B19EEF" | Colour the particles fade to as they drift away from the letters. Pass "currentColor" for monochrome vapour. |
density | number | 1 | Particles per square pixel of lettering. Higher values give finer, denser vapour. |
particleSize | number | 1.2 | Size of each particle in CSS pixels. |
spread | number | 1.2 | How far the vapour travels before it fades, in multiples of the font size. |
rise | number | 1 | Upward drift of the vapour. Negative values let it sink like cold air. |
turbulence | number | 0.8 | How strongly the air currents curl the vapour into wisps. |
diffusion | number | 0.35 | How much individual particles scatter away from the wisps. Higher values read as dust. |
grain | number | 1 | Size of the clumps the letters break into as they evaporate. |
sweep | "left" | "right" | "center" | "top" | "scatter" | "left" | Where the evaporation starts and the next word lands first. Scatter breaks the word up in patches. |
stagger | number | 0.8 | How spread out the sweep is. 0 transforms the whole word at once. |
condense | number | 1.8 | Seconds a word takes to condense out of the vapour. |
hold | number | 2.4 | Seconds each word stays fully formed. |
dissolve | number | 2 | Seconds a word takes to evaporate. |
overlap | number | 0.6 | How early the next word starts condensing, as a fraction of the dissolve. 0 waits for the vapour to clear. |
loop | boolean | true | Keep cycling. When false the last word stays in place. |
startOnView | boolean | true | Wait until the text scrolls into view before the first word condenses. |
interactive | boolean | true | Let the pointer blow the letters into vapour as it passes. Touch scrolling is ignored. |
breath | number | 1 | How strongly the pointer evaporates the letters. Faster movement blows harder. |
breathRadius | number | 0.8 | Reach of the pointer, in multiples of the font size. |
recovery | number | 1.2 | Seconds blown letters take to settle back into place. |
clickAdvance | boolean | true | Clicking the text evaporates the word outward from the click and brings in the next one. |
pauseOnHover | boolean | true | Keep the current word in place while the pointer rests on it, so it can be played with. |
area | "parent" | "self" | "window" | "parent" | Where the pointer is followed: over the parent element, only over the text, or anywhere. |
paused | boolean | false | Freezes the animation. Reduced-motion users always see the first word as plain text. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
onWordChange | (index: number) => void | — | Called when a word starts condensing, with its index in words. |
ref | { next, replay } | — | Imperative controls: evaporate the current word now, or return to the first word. |
className | string | — | Classes for the root element, for example font size and weight. |
style | CSSProperties | — | Inline styles for the root element. |
wordsstring[]Words or short phrases to cycle through. Each one condenses in place of the last.
["Imagine", "Create", "Inspire"]as"span" | "div" | "p" | "h1" | … | "h6"Element to render. The component inherits font, size and weight from its parent and reserves room for the longest word.
"span"align"start" | "center" | "end"How shorter words sit inside the space reserved for the longest one.
"center"colorstringColour of the lettering. Defaults to the surrounding text colour.
"currentColor"vaporColorstringColour the particles fade to as they drift away from the letters. Pass "currentColor" for monochrome vapour.
"#B19EEF"densitynumberParticles per square pixel of lettering. Higher values give finer, denser vapour.
1particleSizenumberSize of each particle in CSS pixels.
1.2spreadnumberHow far the vapour travels before it fades, in multiples of the font size.
1.2risenumberUpward drift of the vapour. Negative values let it sink like cold air.
1turbulencenumberHow strongly the air currents curl the vapour into wisps.
0.8diffusionnumberHow much individual particles scatter away from the wisps. Higher values read as dust.
0.35grainnumberSize of the clumps the letters break into as they evaporate.
1sweep"left" | "right" | "center" | "top" | "scatter"Where the evaporation starts and the next word lands first. Scatter breaks the word up in patches.
"left"staggernumberHow spread out the sweep is. 0 transforms the whole word at once.
0.8condensenumberSeconds a word takes to condense out of the vapour.
1.8holdnumberSeconds each word stays fully formed.
2.4dissolvenumberSeconds a word takes to evaporate.
2overlapnumberHow early the next word starts condensing, as a fraction of the dissolve. 0 waits for the vapour to clear.
0.6loopbooleanKeep cycling. When false the last word stays in place.
truestartOnViewbooleanWait until the text scrolls into view before the first word condenses.
trueinteractivebooleanLet the pointer blow the letters into vapour as it passes. Touch scrolling is ignored.
truebreathnumberHow strongly the pointer evaporates the letters. Faster movement blows harder.
1breathRadiusnumberReach of the pointer, in multiples of the font size.
0.8recoverynumberSeconds blown letters take to settle back into place.
1.2clickAdvancebooleanClicking the text evaporates the word outward from the click and brings in the next one.
truepauseOnHoverbooleanKeep the current word in place while the pointer rests on it, so it can be played with.
truearea"parent" | "self" | "window"Where the pointer is followed: over the parent element, only over the text, or anywhere.
"parent"pausedbooleanFreezes the animation. Reduced-motion users always see the first word as plain text.
falsedprnumberMaximum device pixel ratio for the canvas.
2onWordChange(index: number) => voidCalled when a word starts condensing, with its index in words.
—ref{ next, replay }Imperative controls: evaporate the current word now, or return to the first word.
—classNamestringClasses for the root element, for example font size and weight.
—styleCSSPropertiesInline styles for the root element.
—