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.json

Or, 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

Component props
PropTypeDefaultNotes
prefix / suffixstring'Interfaces that feel' / ''Static text around the rotating word.
wordsstring[]['inevitable', 'calm', 'alive', 'yours']Words to cycle.
intervalnumber2600ms per word (1200–10000).
as'h1' | 'h2' | 'h3' | 'p''h2'Element for the line.
pauseOnHoverbooleantrueHold the current word while hovered.
showControlsbooleantruePause / Play control with a position counter.
onWordChange(word, index) => void—Fires on every change.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • lucide-react
  • 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.

See all 15 Text Animations components