Components / Text
Blur Text
Text that reveals word by word, fading in from a blur as it scrolls into view.
Build beautiful interfaces, one component at a time.
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/blur-text.tsx. - 3
Use it
example.tsximport { BlurText } from "@/components/ui/blur-text"; export default function BlurTextDemo() { return ( <BlurText as="h2" text="Build beautiful interfaces, one component at a time." className="max-w-lg text-center text-3xl font-semibold tracking-tight text-zinc-900 dark:text-white" /> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | — | The text to animate. |
| as | "h1" | "h2" | "h3" | "p" | "span" | "p" | HTML tag to render. |
| delay | number | 0 | Seconds before the first word appears. |
| stagger | number | 0.08 | Seconds between each word. |