Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Text Reveal

Pro

Words or characters ease in with a soft blur, on mount or on scroll.

Installation

pnpm dlx shadcn@latest add @viewport/text-reveal

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
text*string

The text to animate. Read by screen readers as one string.

—
as"h1" | "h2" | "h3" | "p" | "span" | "div"

Element to render. Use a heading tag for headings.

"p"
by"word" | "character"

Split the animation by word or by character.

"word"
delaynumber

Seconds before the first unit starts.

0
staggernumber

Seconds between units.

0.06
inViewboolean

Animate when scrolled into view instead of on mount.

false
classNamestring—

Accessibility

  • The full string is exposed once through aria-label; animated spans are aria-hidden.
  • Renders plain text under reduced motion.
  • Use the `as` prop to keep your heading hierarchy.