# Reveal Text

> Each word rises out of its own slot.

The editorial reveal for big headlines: words rise from beneath an invisible line, wrapping normally, nothing shifting.

- Family: Typography
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/reveal-text/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add reveal-text
```

It installs to `components/galactrex/reveal-text.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

```tsx
import { RevealText } from "@/components/galactrex/reveal-text";

<RevealText as="h1" text="Make something. Keep the file." />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` | `string` | — | The text. |
| `as` | `ElementType` | `"h2"` | Element. |
| `trigger` | `"mount" \| "inView" \| "hover" \| "manual"` | `"inView"` | When it plays. |
| `active` | `boolean` | — | Plays when true, for trigger="manual". |
| `stagger` | `number` | `0.045` | Seconds between words. |
| `from` | `"below" \| "above"` | `"below"` | Where words come from. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Hero.** A large heading on arrival.

## Accessibility

- Real text read once.

## Motion

- Transform inside clipped slots.
- Reduced motion: shown at once.
