Skip to content

Text reveal

Reveal a short piece of content with restrained motion.

TextMotionContent
npx shadcn@latest add @silicon-ui/text-reveal

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/text-reveal

Manually

  1. Copy these files into your project

    • components/silicon-ui/text-reveal/text-reveal.tsx
    • components/silicon-ui/text-reveal/text-reveal.module.css
  2. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { TextReveal } from "@/components/silicon-ui/text-reveal/text-reveal";

API reference

PropTypeDefault
text*string—
as"h1" | "h2" | "h3" | "p""h2"
classNamestring—
idstring—
delaynumber0

Dependencies

npm
None
Registry
silicon-motion-tokens