Skip to content
VenusUI
Get started

Text Reveal

Fades, unblurs and lifts text into place word by word as it scrolls into view.

Preview

Installation

npx shadcn@latest add @venusui/text-reveal

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/text-reveal.tsx

Usage

The code behind the preview above.

text-reveal-demo.tsx

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

export default function TextRevealDemo() {
  return (
    <TextReveal
      as="h2"
      text="Every word arrives exactly when you expect it to."
      className="max-w-md text-center text-3xl font-semibold tracking-tight text-balance"
    />
  )
}

API reference

PropTypeDefaultDescription
textstring—Text to reveal. Required.
as"h1" | "h2" | "h3" | "p" | "span""p"Element to render, so headings keep their meaning.
delaynumber0Seconds before the first word starts.
staggernumber0.06Seconds between words.
repeatbooleanfalseAnimate every time the text enters the viewport, not just the first time.
classNamestring—Classes for the element.

Only the props above.

Requirements

  • The motion package. The CLI installs it.
  • React 19 and Tailwind CSS v4.

Customization

  • Use as="h1" for page titles so the heading structure stays correct.
  • Slow the reveal down with stagger={0.12}, or chain several with increasing delay.

Accessibility

  • The text stays real, selectable text and is read normally by screen readers.
  • Renders plain text without animation when the user prefers reduced motion.

Troubleshooting

Text is invisible.
Words start hidden and appear when half the text is in view. In a container that never scrolls into view, pass repeat or remove the component.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

Blur Text

Text animations

Text whose words rise out of a blur one after another.

Loading preview

Gradient Text

Text animations

Text filled with a slowly moving gradient: a subtle sheen by default, or your own colors.

Loading preview

Number Ticker

Text animations

Counts up to a number when it scrolls into view, with locale-aware formatting.