Text Animations
Reel
A sentence with one slot that keeps changing. The words sit on a drum. The next word rolls up from below while the old one rolls away over the top, as a whole word or letter by letter. The slot's width springs to fit each new word, so the rest of the sentence is pushed along and does not jump. A screen reader gets every word once, as a list.
Install
bun add motionProps
| Prop | Type | Default | Description |
|---|---|---|---|
| interval | number | 2.2 | How long each word stays up. |
| mode | "drum" | "letters" | "letters" | What rolls. `drum` turns the whole word at once. `letters` turns each letter on its own. |
| stagger | number | 35 | Delay between one letter and the next. |
| stiffness | number | 260 | Spring tension for the roll and the width. Higher is faster. |
| damping | number | 24 | Spring friction. Low values wobble before they settle. |
| direction | "up" | "down" | "up" | Which way the drum turns. |
| pauseOnHover | boolean | true | Hold the current word while the pointer is over it. |
| underline | boolean | true | A thin bar under the slot. It follows the slot's width. |
| accentColor | string (hex) | "#a855f7" | Color of the word in the slot, and of the bar. |
What It Demonstrates
- 3D tilt / Flip
- Rotate in 3D space (rotateX / rotateY) to add depth.
- Stagger
- Animate several items one after another with a small delay between each, creating a cascade.
- Spring
- Motion driven by physics (tension, mass, damping) rather than a set duration.
- Enter / Exit
- The animation an element plays when it's added to or removed from the screen.
- Loop
- An animation that repeats, a set number of times or infinitely.
Related Components
Redact
Copy that arrives fully classified under solid bars, then declassifies word by word. Each bar clears its own word and leaves an amethyst edge behind as the only evidence it was ever there.
Split Flap
A Solari departure board. Every column walks the charset one flap at a time until it reaches its letter, so the word is never revealed. It is arrived at, with a real hinged half falling away as the next one seats behind it.
Flipdot
A mechanical flip-dot sign. Each word is drawn on a grid of small discs. To show the next word, the discs turn over in a sweep: by column, on a diagonal, out from the center, or at random. A disc squashes as it turns and swings a little past flat before it settles. Hover to flip the discs under the pointer, or click to send a wave across the sign.
Letters Pull
A per-letter pull-up reveal. Letters rise, sharpen from a blur, and fade in with a stagger.
Reflow
Text whose words keep their identity when the line breaks move. Narrow the measure and the sentence travels instead of re-wrapping.
Neon
A neon sign, with everything that is wrong with a neon sign. Tubes strike one at a time rather than together, each settling at its own moment inside the ignition. The steady state carries a mains hum, and every so often one tube gives up for a third of a second and comes back. The glow is baked once per letter into a sprite, so a frame is a handful of draws no matter how wide the word, and the word itself never stops being a real, selectable text node underneath.