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 that hop on hover.

Try it: Hover, tap or Tab to the highlighted words.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/charm-text.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/charm-text. You can also copy the source into components/ui/charm-text.tsx (view on GitHub).

Usage

import { CharmText } from '@/components/ui/charm-text'

Props

Component props
PropTypeDefaultNotes
segments(string | { text, glyph, tone, hint? })[]sample sentencePlain strings and charmed words. glyph: spark | drop | bird | leaf | heart | bolt | star | moon; tone: rose | amber | sky | emerald | violet.
variant'ink' | 'chip''ink'ink recolours the word and sprouts a glyph; chip shows an inline pill.
as'p' | 'h1' | 'h2' | 'h3''p'Element for the sentence.
classNamestring—Extra classes (set the type size here).

Dependencies

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

  • 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…

  • 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.…

  • Infinite Marquee

    Seamless looping strip with masked edge fades; pauses on hover, focus or with an optional pause button. Wraps statically under reduced motion.

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

  • Number Ticker

    Counts to a value when scrolled into view with locale-aware grouping and tabular figures; re-animates from the current value when it changes.

See all 15 Text Animations components