Text reveal preview

Text reveal

Text that arrives word by word or letter by letter – each piece rises out of a soft blur as it scrolls into view

  • Group
    Text effects
  • Origin
    Copied · affectUI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/text-reveal

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { TextReveal } from "@/registry/components/text-reveal/text-reveal";

<TextReveal text="…" />

Props

NameTypeDefaultDescription
textstringThe text to reveal
by"word" | "char""word"Reveal word by word or letter by letter
staggernumber40Time between two pieces, in ms
delaynumber0Wait before the first piece, in ms
durationnumber700Time each piece takes to arrive, in ms
as"p" | "h1" | "h2" | "h3" | "span""p"Element to render
oncebooleantrueReveal only the first time; otherwise it plays again each time it enters the view
classNamestringExtra class on the root

When to use

- Headlines and short intros on landing pages that should arrive as you scroll - A key sentence you want read in order, like a mission statement or a quote

When not to use

Body text or UI labels.

Related

Blur reveal · Scramble text