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.

Try it: Hover the word to make it sparkle again.

Installation

Install with the shadcn CLI:

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

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

Usage

import { SparkleText } from '@/components/ui/sparkle-text'

Props

Component props
PropTypeDefaultNotes
textstring'Delightful'The text.
as'h1' | 'h2' | 'h3' | 'p' | 'span''span'Element to render.
colorsstring[]['#8b74b5', '#f97316', '#c4b5fd']Sparkle colours (cycled).
countnumber10Max sparkles alive at once (1–20).
restAfternumber6000ms of sparkling before resting; 0 never rests.
gradientbooleantrueInk-to-accent gradient fill (AA in both themes).
classNamestring—Extra classes merged onto the root.

Dependencies

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

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

  • Tumble Letters

    A headline of physical letters: drop them and they fall, spin, bounce and pile against each other on the floor; hover lifts letters in a wave, any letter can be grabbed and flung, and Reassemble…

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

  • Glyph Weather

    Glyphs drift with scroll direction.

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

See all 15 Text Animations components