text animations
Flip Words
Words flip in and out with a 3D rotation on a configurable timer — drop it inline in a heading to cycle through key phrases with spring physics.
Installation
Usage
Anatomy
Good to know
- It cycles through
wordsforever, changing everydurationmilliseconds (default3000). - Screen readers only hear the word that's showing when they reach it.
- Because the words have different widths, surrounding text can shift. Give it a fixed width or place it at the end of a line.
- When the user has turned on reduced motion, the words still change on the timer but swap instantly, with no flip.
Props
Examples
Hero Inline
Words flip inline inside a heading. Use className to colour the cycling word differently from the surrounding text.
CTA Button
Short action verbs flip inside a full-width button, giving static copy a sense of urgency and motion. A tighter spring (stiffness: 120, damping: 10) makes the snap feel snappier.
Testimonial Card
A testimonial quote uses FlipWords to cycle the audience descriptor — "engineers", "designers", "founders" — inside a card layout with avatar.