Text Reveal
MotionA paragraph that lights up word by word as it scrolls through the viewport, from muted to full ink, using Motion scroll progress. Still text for reduced motion.
Installation
npx shadcn@latest add @minidev/text-reveal
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/text-reveal.json
Usage
import { TextReveal } from "@/components/ui/text-reveal"
export function Example() {
return (
<TextReveal />
)
}
API reference
When to use
Use it for one manifesto or mission paragraph on a long page. Reach for MaskedGradientHeadline for a headline wipe, and BlurFade or ScrollReveal to bring whole blocks in.
Accessibility
- Before they light up, words sit at 18% opacity, which is below text contrast minimums. Readers who stop scrolling halfway see faint text.
- Under reduced motion the plain text renders at full ink with no per-word spans.
- Each word is an
inline-blockspan with a normal space after it, so copied text reads as plain text and lines wrap between words.
Frequently asked questions
Does TextReveal hide text from search engines?
No. The words are real text in order. Each word starts at 18% opacity. The words reach full ink in order, from when the top of the paragraph passes 85% of the viewport height until its bottom reaches 40%.
Can I use it for several paragraphs?
It takes one text string and renders one <p>. Use one TextReveal per paragraph, and keep it for a single mission or manifesto line; long passages are tiring to read this way.
Dependencies
npm
Built from
Examples
Custom copy
text is split on spaces and each word brightens in turn as the paragraph moves up the viewport.
Larger type
Size and width come from className; a wider column keeps long sentences to three or four lines.
With an eyebrow
A small label above the paragraph sets the context before the words light up.