cnippet/ui
  1. motion
  2. text animations
  3. text roll

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

  • children must be a plain string. It's split into letters.
  • It plays once when it mounts. getEnterDelay and getExitDelay set each letter's delay from its index.
  • onAnimationComplete fires 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; onAnimationComplete still 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.

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.