Installation
Basic Usage
tsx
<TextReveal text="Hello, world!" variant="blur" />Advanced Usage
tsx
<TextReveal text="Hello, world!" variant="blur" className="text-2xl font-bold" delayPerWord={0.1} duration={1}/>
- Blur: Blur the text
- Chat: Chat-like effect
- Pop: Pop-like effect
tsx
// Blur<TextReveal text="Hello, world!" variant="blur" className="text-2xl font-bold" delayPerWord={0.1} duration={1} /> // Chat<TextReveal text="Hello, world!" variant="chat" className="text-2xl font-bold" delayPerWord={0.1} duration={1} /> // Pop<TextReveal text="Hello, world!" variant="pop" className="text-2xl font-bold" delayPerWord={0.1} duration={1} />
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | No | — | The text to reveal |
| variant | string | No | — | The variant of the text reveal |
| className | string | No | — | The class name of the text reveal |
| delayPerWord | number | No | — | The delay per word |
| duration | number | No | — | The duration of the text reveal |
Best Practices
- Cap stagger so long strings stay near the UI budget (≤280ms per word + capped delay).
- Prefer ease-out /
bounce: 0springs — neverbackOutovershoot. - Under reduced motion, render plain text with no stagger.
- Use for occasional/first-view copy, not high-frequency UI chrome.