NK

Search

Search pages, posts, and components

All components

Wavy Text

Typography

Each letter bobs up and down in a continuous wave.

Installation

Add it with the shadcn CLI:

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

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

Props

PropTypeDefaultDescription
textstring - Text to animate.

Accessibility

  • The wrapper carries an aria-label, and letters are aria-hidden.
  • Screen readers get the whole phrase, not a letter at a time.
  • Motion is transform-only, so it never triggers layout.

Dependencies

motionclsxtailwind-merge