text animations
Text Roll
Characters roll in and out with a 3D perspective flip — each letter animates independently for a mechanical, tactile reveal effect.
Installation
Usage
Anatomy
Good to know
childrenmust be a plain string. It's split into letters.- It plays once when it mounts.
getEnterDelayandgetExitDelayset each letter's delay from its index. onAnimationCompletefires when the last letter finishes.- Screen readers read the full text once; the individual letters are hidden from them.
- When the user has turned on reduced motion, the roll finishes instantly;
onAnimationCompletestill fires.
Props
Examples
Hero Headline
Letter-by-letter roll reveal for a landing page heading. Each character flips in sequentially with a tight stagger.
Stats Row
Three TextRoll instances with offset getEnterDelay functions animate a row of key metrics simultaneously. A replay button re-mounts the animation.
Navigation Links
Staggered text-roll applied to nav links on mount. Each link starts with a small group offset so the entire nav rolls in left to right.