A per-character vertical text roll animation for label swaps and micro-interactions.
Made by AxylInstallation
Usage
TextRoll does not animate on hover or click by itself — update the text prop (same as SlotText from slot-text):
Click the preview button to see Copy → Copied roll. Hover alone does not trigger the effect.
Direction, stagger, and bounce:
Chromatic sweep on roll — pass a color function or use the built-in helper:
For aligned short labels (Copy → Copied), keep skipUnchanged at the default true so shared letters stay put. Turn it off when lengths differ so the whole line rolls uniformly.
Props
| Prop | Type | Default |
|---|---|---|
text? | string | - |
options? | TextRollOptions | - |
direction? | "up" | "down" | "down" |
stagger? | number | 45 |
duration? | number | 300 |
bounce? | number | 0.6 |
skipUnchanged? | boolean | true |
chromatic? | boolean | false |
className? | string | - |
Credits
Inspired by slot-text.
Built by Axyl. The source code will be available on GitHub soon.
Last updated: 6/19/2026