A headline that condenses out of drifting smoke, letter by letter
| Name | Type | Default | Description |
|---|---|---|---|
text | string | "Out of thin air" | The headline. It stays real, selectable text; the smoke is drawn behind it. |
as | "span" | "div" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | Element to render. |
fontSize | number | string | "clamp(2.75rem, 8vw, 6.5rem)" | Font size. Numbers are pixels; strings accept any CSS length. |
fontWeight | number | 600 | Font weight. The font family is inherited from the page. |
letterSpacing | string | "-0.035em" | Letter spacing as a CSS length. |
lineHeight | number | 1.1 | Line height for wrapped headlines. Each line condenses in turn. |
align | "left" | "center" | "right" | "center" | Text alignment. |
color | string | inherited | Colour of the finished letters. Leave unset to inherit from the page. |
smokeColor | string | "#B19EEF" | Colour of the smoke. Letters shift from this colour to their own as they settle. |
trigger | "view" | "mount" | "manual" | "view" | When the first reveal plays: when the headline scrolls into view, as soon as it mounts, or only when visible becomes true. |
visible | boolean | true | Set to false to dissolve the headline into rising smoke, and back to true to condense it again. |
direction | "left" | "right" | "center" | "edges" | "random" | "left" | Order the letters condense in. |
delay | number | 0.15 | Seconds before the reveal starts. |
duration | number | 0.9 | Seconds each letter takes to condense. |
stagger | number | 0.11 | Seconds between one letter and the next. |
rise | number | 1 | How far the smoke drifts up into place, in em. |
turbulence | number | 1 | How much the smoke swirls on its way, from 0 (straight) to 3. |
softness | number | 1 | How diffuse the smoke is before it condenses. |
density | number | 1 | Opacity of the smoke, from 0 to 3. |
speed | number | 1 | Time scale for the whole effect. |
replayOnHover | boolean | false | Replay the reveal when the pointer enters, sweeping in from the side it came from. |
quality | number | 1 | Resolution scale for the smoke, from 0.25 to 1. |
onComplete | () => void | — | Called when a reveal finishes. |
ref | { replay, condense, dissolve } | — | Play the reveal again, or condense and dissolve the headline from code. |
className | string | — | Classes for the root element. |
style | CSSProperties | — | Inline styles for the root element. |
textstringThe headline. It stays real, selectable text; the smoke is drawn behind it.
"Out of thin air"as"span" | "div" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6"Element to render.
"span"fontSizenumber | stringFont size. Numbers are pixels; strings accept any CSS length.
"clamp(2.75rem, 8vw, 6.5rem)"fontWeightnumberFont weight. The font family is inherited from the page.
600letterSpacingstringLetter spacing as a CSS length.
"-0.035em"lineHeightnumberLine height for wrapped headlines. Each line condenses in turn.
1.1align"left" | "center" | "right"Text alignment.
"center"colorstringColour of the finished letters. Leave unset to inherit from the page.
inheritedsmokeColorstringColour of the smoke. Letters shift from this colour to their own as they settle.
"#B19EEF"trigger"view" | "mount" | "manual"When the first reveal plays: when the headline scrolls into view, as soon as it mounts, or only when visible becomes true.
"view"visiblebooleanSet to false to dissolve the headline into rising smoke, and back to true to condense it again.
truedirection"left" | "right" | "center" | "edges" | "random"Order the letters condense in.
"left"delaynumberSeconds before the reveal starts.
0.15durationnumberSeconds each letter takes to condense.
0.9staggernumberSeconds between one letter and the next.
0.11risenumberHow far the smoke drifts up into place, in em.
1turbulencenumberHow much the smoke swirls on its way, from 0 (straight) to 3.
1softnessnumberHow diffuse the smoke is before it condenses.
1densitynumberOpacity of the smoke, from 0 to 3.
1speednumberTime scale for the whole effect.
1replayOnHoverbooleanReplay the reveal when the pointer enters, sweeping in from the side it came from.
falsequalitynumberResolution scale for the smoke, from 0.25 to 1.
1onComplete() => voidCalled when a reveal finishes.
—ref{ replay, condense, dissolve }Play the reveal again, or condense and dissolve the headline from code.
—classNamestringClasses for the root element.
—styleCSSPropertiesInline styles for the root element.
—