# Text Reveal

> A 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.

- Kind: Motion component (Motion)
- Docs: https://ui.minidev.pro/docs/text-reveal
- Source (registry JSON with the full file): https://ui.minidev.pro/r/text-reveal.json
- License: MIT. One file, yours to edit after install.

## 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.

## Installation

### shadcn CLI (copies the source into your project)

```bash
npx shadcn@latest add @minidev/text-reveal
```

Writes `components/ui/text-reveal.tsx` and installs its npm dependencies. Older CLI versions: `npx shadcn@latest add https://ui.minidev.pro/r/text-reveal.json`.

### npm package

```bash
npm i minidev-ui-kit motion
```

Add the tokens to your global stylesheet once:

```css
@import "tailwindcss";
@import "minidev-ui-kit/styles.css";
@source "../node_modules/minidev-ui-kit";
```

Next.js also needs `transpilePackages: ["minidev-ui-kit"]` in next.config.

## Import

After the shadcn install:

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

From the npm package:

```tsx
import { TextReveal } from "minidev-ui-kit/premium/text-reveal"
```

## Usage

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

export function Example() {
  return (
    <TextReveal />
  )
}
```

## Props

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | `string` | `"Most interfaces are assembled. The g...` | no |  |
| `className` | `string` | - | no |  |

## Examples

### Custom copy

text is split on spaces and each word brightens in turn as the paragraph moves up the viewport.

```tsx
<TextReveal text="Lumen watches every invoice from the moment it leaves: opened, viewed, paid or overdue, with the next step already queued. Nobody on your team writes a chasing email again." />
```

### Larger type

Size and width come from className; a wider column keeps long sentences to three or four lines.

```tsx
<TextReveal className="max-w-3xl text-3xl sm:text-4xl" text="Most finance tools are assembled. Lumen is drawn: every number, reminder and report placed on purpose." />
```

### With an eyebrow

A small label above the paragraph sets the context before the words light up.

```tsx
<div className="w-full max-w-2xl">
  <p className="mb-4 text-xs font-medium tracking-[0.06em] text-accent-fg uppercase">Why Northwind switched</p>
  <TextReveal text="We used to spend the first week of every month closing the last one. Now the numbers are current on the first Monday, and the board pack writes itself." />
</div>
```

## 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-block` span with a normal space after it, so copied text reads as plain text and lines wrap between words.

## FAQ

### 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.

## Rules for generating code

- Use semantic tokens only (bg, surface, sunken, border, fg, fg-muted, fg-subtle, ink, accent, success, warning, danger). Never raw hex or palette steps like blue-500.
- Shadows only from the set: shadow-xs, shadow-sm, shadow-raised, shadow-md, shadow-lg, shadow-overlay.
- Numbers use tabular-nums. Dark mode is the `dark` class on <html>; components never branch on theme.

## Dependencies

- npm: `motion`

## Related

- [Masked Gradient Headline](https://ui.minidev.pro/docs/masked-gradient-headline/md): A gradient text headline that wipes in from left to right with a clip path reveal when it scrolls into view. Accepts any children as the heading text.
- [Blur Fade](https://ui.minidev.pro/docs/blur-fade/md): React reveal wrapper that fades, unblurs and lifts children into place as they scroll into view, with delay, duration, direction and once props.
- [Scroll Reveal](https://ui.minidev.pro/docs/scroll-reveal/md): A React wrapper that slides its children up into place once they scroll into view, with configurable offset and delay. Renders still for reduced motion.
- [Animated Feature Row](https://ui.minidev.pro/docs/animated-feature-row/md): A row of feature cards that slide up with a staggered delay when scrolled into view. Pass title and description pairs; reduced motion keeps them still.
- [Card Tilt](https://ui.minidev.pro/docs/card-tilt/md): A card that tilts in 3D toward the pointer on springs, with an accent glare that follows the cursor. It stays flat when reduced motion is preferred.
- [Cursor Spotlight Panel](https://ui.minidev.pro/docs/cursor-spotlight-panel/md): A panel whose accent radial spotlight follows the cursor, driven by Framer Motion values without re-renders. It shows a still surface for reduced motion.

---

All 557 components: https://ui.minidev.pro/llms.txt (full text: https://ui.minidev.pro/llms-full.txt).
