NK

Search

Search pages, posts, and components

All components

Gsap Text Reveal

Typography

Reveals text character-by-character with a GSAP stagger.

Installation

Add it with the shadcn CLI:

$pnpm dlx shadcn@latest add https://nawalkattel.com.np/r/gsap-text-reveal.json
Or install manually
  1. 1. Install dependencies

    pnpm add gsap clsx tailwind-merge
  2. 2. Copy the component source into components/library/gsap-text-reveal.tsx

Props

PropTypeDefaultDescription
textstring - Text to reveal.

Accessibility

  • The wrapper carries an aria-label; characters are aria-hidden.
  • gsap.context scopes the animation and reverts it on unmount.
  • Loops with a pause, so it never becomes a constant distraction.

Dependencies

gsapclsxtailwind-merge