Charcoal UI

Text Reveal

Words rise out of a blur one after another, when the text scrolls into view.

  • Category: Text
  • Licence: Free, MIT
  • Built with: React 19, Tailwind CSS 4, Motion
  • Dependencies: motion, clsx, tailwind-merge

Examples

Text Reveal

API reference

PropTypeDefaultDescription
textstring—
asElementType"p"
by"word" | "char""word"
staggernumber0.04
oncebooleantrue

About Text Reveal

Text Reveal brings headlines and paragraphs in word by word, or letter by letter, each piece rising out of a soft blur as the text scrolls into view. It is the entrance that makes a hero line feel considered rather than dropped in.

Text Reveal is a text animation for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.

When to use Text Reveal

  • Hero headlines on landing pages.
  • Section titles as the reader scrolls.
  • Quotes and testimonials.
  • Product announcements and launch pages.

How it works

Each word or character is a Motion span with a staggered variant, triggered once by whileInView. The real text stays in the DOM, so search engines index it and screen readers read it once, cleanly. by, stagger and delay tune the rhythm.

The real text stays in the page for screen readers and search engines; the animated letters are decorative copies marked aria-hidden. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.

Customizing Text Reveal

Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.

The Customize panel next to the preview lets you change text, by, stagger live, and the Code tab updates to match, so the snippet you copy already carries your values.

  • text (string).
  • as (ElementType, default "p").
  • by ("word" | "char", default "word").
  • stagger (number, default 0.04).
  • once (boolean, default true).

Goes well with Text Reveal

Text Reveal is already composed into a ready-made section, so you can see it in context or install the whole block.

  • Hero Showcase: Hero section
  • Shimmer Text: React shimmer text: a band of light sweeps across, for loading and thinking states
  • Typewriter: A React typewriter effect with a human rhythm that types, holds and deletes words
  • Gradient Text: React gradient text with a slowly flowing accent gradient, CSS only
  • Scramble Text: React scramble text: characters cycle through glyphs before locking in
  • Rotating Text: React rotating text that rolls between words letter by letter and resizes smoothly

Install Text Reveal

npx shadcn@latest add https://charcoalui.com/r/text-reveal.json

Text Reveal is free and MIT licensed. The command copies text-reveal.tsx into components/ui and installs clsx, tailwind-merge; you can also copy the source from the Code tab by hand.

It pairs well with Text Pressure, a Pro piece: Letters thicken as the pointer approaches, like pressing into soft type. Needs a variable font.

Frequently asked questions

How do I install Text Reveal?
Run npx shadcn@latest add https://charcoalui.com/r/text-reveal.json. The shadcn CLI copies text-reveal.tsx into components/ui and installs motion, clsx, tailwind-merge. You can also copy the source from this page by hand.
Is Text Reveal free for commercial use?
Yes. Text Reveal is MIT licensed: use it in any personal or commercial project and change it however you like.
Does Text Reveal work with Next.js?
Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
Can an AI coding agent install Text Reveal?
Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Text Reveal's props and source and get_install_command returns the exact command.

Text Reveal as Markdown · llms.txt