Text reveal
Reveal a short piece of content with restrained motion.
Bring a section title in as it scrolls into view.
npx shadcn@latest add @silicon-ui/in-view-titlenpx shadcn@latest add @silicon-ui/in-view-titleInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/in-view-title/in-view-title.tsxcomponents/silicon-ui/in-view-title/in-view-title.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
text* | string | — |
variant | InViewTitleVariant
| "blur" |
as | "h1" | "h2" | "h3" | "h2" |
lines | string[] | — |
className | string | — |
id | string | — |
once | boolean | true |