Text reveal
Reveal a short piece of content with restrained motion.
npx shadcn@latest add @silicon-ui/text-revealInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/text-revealManually
Copy these files into your project
- components/silicon-ui/text-reveal/text-reveal.tsx
- components/silicon-ui/text-reveal/text-reveal.module.css
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
text* | string | — |
as | "h1" | "h2" | "h3" | "p" | "h2" |
className | string | — |
id | string | — |
delay | number | 0 |
Dependencies
- npm
- None
- Registry
- silicon-motion-tokens