Components / Text
Wavy Text
Letters that ripple in a wave, on a loop or on hover.
Making waves 🌊
Or on hover: hover me
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/wavy-text.tsx. - 3
Use it
example.tsximport { WavyText } from "@/components/ui/wavy-text"; export default function WavyTextDemo() { return ( <div className="space-y-4 text-center"> <WavyText text="Making waves 🌊" className="text-4xl font-semibold text-zinc-900 dark:text-white" /> <p className="text-sm text-zinc-500"> Or on hover:{" "} <WavyText text="hover me" trigger="hover" className="font-semibold text-orange-600 dark:text-orange-400" /> </p> </div> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | — | The text. |
| trigger | "loop" | "hover" | "loop" | Loop forever, or ripple once per hover. |
| height | number | 0.3 | Wave height in em. |