Text shimmer
Show ongoing work with a calm light across the words.
npx shadcn@latest add @silicon-ui/text-shimmerInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/text-shimmerManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/text-shimmer/text-shimmer.tsx
- components/silicon-ui/text-shimmer/text-shimmer.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 |
|---|---|---|
children*The status text. Keep it to one short line. | string | — |
activeSweep while work is ongoing. Defaults to true. | boolean | true |
durationSeconds for one sweep across the text. Defaults to 1.8. | number | 1.8 |
as | "span" | "p" | "div" | "h2" | "h3" | "h4" | "span" |
className | string | — |
id | string | — |
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokens