Text Animations
Animated Number
Animated numeric transitions with flip, slide, fade, and bounce styles.
Install
bun add motionProps
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | 999 | The value to display and animate to. |
| animationType | "flip" | "slide" | "fade" | "scale-bounce" | "flip" | Transition style between values. |
| duration | number | 0.4 | Transition duration. |
| staggerDelay | number | 0.05 | Delay between each digit's animation. |
What It Demonstrates
- Number ticker
- Digits rolling or counting up to a value.
- Tabular numbers
- Fixed-width digits so numbers don't shift around as they change. Essential for tickers, timers, and counters.
- Bounce
- A spring that overshoots and settles, adding playfulness.
- Slide in
- Element enters by sliding in from off-screen (left, right, top, or bottom).
- Fade in / Fade out
- Element appears or disappears by changing opacity.
- 3D tilt / Flip
- Rotate in 3D space (rotateX / rotateY) to add depth.
Related Components
Letters Pull
A per-letter pull-up reveal. Letters rise, sharpen from a blur, and fade in with a stagger.
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.
Inscribe
Text engraved stroke by stroke. Every character is a real SVG tspan with native kerning and selectable words, wearing the uniform-dash trick, because glyph outlines expose no pathLength and measuring their true perimeter has no API: the chisel simply travels each letter at its own apparent speed. When a stroke closes, its fill carves in after a beat, and the engraved finish darkens the fill and adds an inset relief so the word reads as cut into the panel rather than printed on it. The whole timeline runs on the animation-loop clock, so the bench pause freezes the chisel mid-stroke, and with no JavaScript at all the text simply sits there finished.
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.
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.
Morphing Text
A gooey blur-morph that cross-dissolves between a list of words.