Word Cycle Text
A headline whose key word keeps changing its mind: each word rises letter by letter out of a soft blur inside a tinted capsule that resizes on a spring while the line glides to make room.
Try it: Hover the line to hold a word; use the pause control below it.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/word-cycle-text.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/word-cycle-text. You can also copy the source into components/ui/word-cycle-text.tsx (view on GitHub).
Usage
import { WordCycleText } from '@/components/ui/word-cycle-text'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
prefix / suffix | string | 'Interfaces that feel' / '' | Static text around the rotating word. |
words | string[] | ['inevitable', 'calm', 'alive', 'yours'] | Words to cycle. |
interval | number | 2600 | ms per word (1200–10000). |
as | 'h1' | 'h2' | 'h3' | 'p' | 'h2' | Element for the line. |
pauseOnHover | boolean | true | Hold the current word while hovered. |
showControls | boolean | true | Pause / Play control with a position counter. |
onWordChange | (word, index) => void | — | Fires on every change. |
className | string | — | Extra classes merged onto the root. |
Dependencies
motionlucide-react
Related Text Animations components
- Highlight Marker Text
Editorial copy annotated by hand: as it scrolls into view a marker sweeps behind one phrase, an underline draws under the next, a pen circle loops another and a strike crosses one out, in sequence.…
- Charm Text
A sentence with a few enchanted words. Hover, focus or tap one and it recolours, draws an underline and a tiny glyph pops out on a spring; click pins it on. A chip variant sets glyph pills inline…
- Sparkle Text
A word that catches the light: four-point stars bloom and fade around it on staggered clocks while the letters carry a soft ink-to-accent gradient. Sparkles on scroll-in or hover, then rests.
- Scroll Text Fill
A large editorial statement whose words light up one by one as you scroll, each rising a few pixels into place; accent words get a sweeping underline. The full sentence is exposed to screen readers…
- Ink Bleed Text
A serif headline that soaks into the page: each word lands as a wet blot of ink that spreads through the paper fibres (an SVG turbulence displacement relaxing to zero), then dries crisp from a soft…
- Infinite Marquee
Seamless looping strip with masked edge fades; pauses on hover, focus or with an optional pause button. Wraps statically under reduced motion.