A label that becomes the cursor and trails a 3D stack
| Name | Type | Default | Description |
|---|---|---|---|
phrases | string[] | ["Explore", "Create", "Ship"] | Words the label flips through. Each change rolls the old word out and the new one in while the label resizes. |
interval | number | 2.4 | Seconds each phrase holds before the next one rolls in. |
color | string | "#FAFAFA" | Fill of the label and of the stack it leaves behind. |
textColor | string | "#0A0A0A" | Colour of the label text. |
accentColor | string | "#5227FF" | Border and corner handles of the label, like a selected layer in a design tool. |
fontSize | number | 15 | Text size in pixels. The label's padding, height and handles scale with it. |
fontWeight | number | 500 | Weight of the label text. |
fontFamily | string | "inherit" | Font of the label. inherit uses the font of the surrounding page. |
radius | number | 6 | Corner radius of the label in pixels. |
handles | boolean | true | Show the square handles on the label's corners. |
trail | number | 0.4 | Seconds of motion the stack of labels trails behind. 0 turns the trail off. |
depth | number | 0.8 | How strongly the stack shades into the page as it recedes, from 0 to 1. |
taper | number | 0.4 | How much the stack narrows toward its tail, from 0 to 1. |
tilt | number | 1 | How far the label leans into fast horizontal moves, from 0 to 2. |
follow | number | 0.06 | Seconds the label takes to catch up with the pointer. |
clickToCycle | boolean | true | Clicking flips straight to the next phrase. |
hideCursor | boolean | true | Hide the native cursor inside this component, so the label becomes the cursor. Text fields keep their caret. |
autoplay | boolean | false | Let the label wander on its own while the pointer is away. |
autoplaySpeed | number | 1 | Speed of that wandering. |
idleDelay | number | 1.5 | Seconds after the pointer leaves before the wandering label takes over again. |
interactive | boolean | true | Let the pointer drive the label. Reduced-motion users get the label without the trail, tilt or wandering. |
ref | { next, say } | — | next() flips to the next phrase. say(text) holds a specific label until you call say(null). |
data-cursor-label | attribute | — | Put it on any element inside to show that text while the pointer is over it, such as "View" on a project card. |
children | ReactNode | — | The content the label moves over. |
className | string | — | Classes for the root element. It fills its parent, with a 240px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
phrasesstring[]Words the label flips through. Each change rolls the old word out and the new one in while the label resizes.
["Explore", "Create", "Ship"]intervalnumberSeconds each phrase holds before the next one rolls in.
2.4colorstringFill of the label and of the stack it leaves behind.
"#FAFAFA"textColorstringColour of the label text.
"#0A0A0A"accentColorstringBorder and corner handles of the label, like a selected layer in a design tool.
"#5227FF"fontSizenumberText size in pixels. The label's padding, height and handles scale with it.
15fontWeightnumberWeight of the label text.
500fontFamilystringFont of the label. inherit uses the font of the surrounding page.
"inherit"radiusnumberCorner radius of the label in pixels.
6handlesbooleanShow the square handles on the label's corners.
truetrailnumberSeconds of motion the stack of labels trails behind. 0 turns the trail off.
0.4depthnumberHow strongly the stack shades into the page as it recedes, from 0 to 1.
0.8tapernumberHow much the stack narrows toward its tail, from 0 to 1.
0.4tiltnumberHow far the label leans into fast horizontal moves, from 0 to 2.
1follownumberSeconds the label takes to catch up with the pointer.
0.06clickToCyclebooleanClicking flips straight to the next phrase.
truehideCursorbooleanHide the native cursor inside this component, so the label becomes the cursor. Text fields keep their caret.
trueautoplaybooleanLet the label wander on its own while the pointer is away.
falseautoplaySpeednumberSpeed of that wandering.
1idleDelaynumberSeconds after the pointer leaves before the wandering label takes over again.
1.5interactivebooleanLet the pointer drive the label. Reduced-motion users get the label without the trail, tilt or wandering.
trueref{ next, say }next() flips to the next phrase. say(text) holds a specific label until you call say(null).
—data-cursor-labelattributePut it on any element inside to show that text while the pointer is over it, such as "View" on a project card.
—childrenReactNodeThe content the label moves over.
—classNamestringClasses for the root element. It fills its parent, with a 240px minimum height.
—styleCSSPropertiesInline styles for the root element.
—