Text morph
Morph a label into its next state, letter by letter.
npx shadcn@latest add @silicon-ui/text-morphInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/text-morphManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/text-morph/text-morph.tsx
- components/silicon-ui/text-morph/text-morph.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* | string | — |
as | "span" | "div" | "p" | "strong" | "h1" | "h2" | "h3" | "span" |
className | string | — |
id | string | — |
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokens