Text reveal
Reveals text one word or one character at a time.
Make room for the unusual.
text-reveal-basic-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
Characters
A word stays on one line unless it is wider than its container.
Studio notes
text-reveal-characters-demo.tsx
Sequence
Set delay to start one reveal after another.
Studio notes
Make room for the unusual.
text-reveal-demo.tsx
API reference
- text: stringRequired
- The text to show. Screen readers read it once, as plain text.
- split: "words" | "characters" = "words"
- Reveal by word or by character. Use words for scripts that join letters, such as Arabic.
- trigger: "mount" | "in-view" = "in-view"
- Start on mount, or the first time the text comes into view.
- stagger: number = 0.045
- Delay in seconds between units. Long text uses a shorter delay, so the last unit starts within 0.6 seconds of the first.
- delay: number = 0
- Delay in seconds before the first unit starts.