---
title: "Text Flip Reveal"
description: "A heading enters piece by piece: each word turns up on its bottom edge, like a card that stands up."
url: https://gelatinui.com/components/text-flip-reveal
markdown_url: https://gelatinui.com/components/text-flip-reveal.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-flip-reveal"
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Flip Reveal

> A heading enters piece by piece: each word turns up on its bottom edge, like a card that stands up.

Page: https://gelatinui.com/components/text-flip-reveal

## When to use it

Best for: A hero heading or a section title that enters piece by piece once, on mount or in view.

- Use `delay` to start a lead or a second line after the heading.
- Use `show` to play the text out and in again; a turn in the middle goes back from where it is.
- Use `order` to start from the middle (`center`), from both ends (`edges`), or in a fixed shuffle (`random`).

## When not to use it

- For the same effect with another look, use [Text Fade Reveal](https://gelatinui.com/components/text-fade-reveal.md).
- For text that types in letter by letter with a caret, use [Text Typewriter](https://gelatinui.com/components/text-typewriter.md).

## Notes for agents

- Flip Reveal owns its look: it builds on Text Reveal and takes every other Text Reveal prop and part.
- The hidden look is in the server HTML, so the text never shows and then hides. With no JavaScript the text stays hidden.
- `trigger` defaults to `view`: it runs once, the first time a part of the text is on screen in a visible tab. Use `mount` above the fold.
- Each piece is an inline block, so a link underline does not reach into it: put Flip Reveal next to a link, not inside one.
- Arabic and other joined scripts never split into letters: `by="grapheme"` reveals them by word.

## Anatomy

```text
TextFlipReveal
```

## API reference

### TextFlipReveal

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `locale` | `string` |  | The BCP 47 locale for the letter and word split (`Intl.Segmenter`). Default: the `DisplayLocaleProvider` locale, else `"en-US"`. |
| `children` | `string` |  | The text to reveal. A new text reveals again. |
| `by` | `"grapheme" \| "line" \| "word"` |  | The size of the pieces that enter one after another. Default `word`. `line` moves the words of one line together, so the lines enter one by one. A script that joins its letters (Arabic) never splits into letters: `grapheme` reveals it by word. |
| `order` | `"center" \| "edges" \| "end" \| "random" \| "start"` |  | The order in which the pieces (or the lines, with `by` `line`) start: `start` (default, reading order), `end`, `center` (from the middle out), `edges` (from both ends in), or `random` (a fixed shuffle of each text, the same on the server and in each run). |
| `show` | `boolean` |  | Off plays the text out: the pieces go back to the hidden look, the last piece in first, at half the pace. On again plays it in from where it is. Default on. |
| `trigger` | `ViewEntryTrigger` |  | When the reveal starts: `view` (default) the first time a part of the text is on screen, `mount` at once. |
| `delay` | `number` |  | Seconds to wait before the first piece, to follow another reveal. It holds for each reveal from rest (the first one, and each `show` on after a whole exit), not for a turn back in the middle of an exit. Default 0. |
| `onComplete` | `function` |  | Called when the last piece has landed. |
| `onExitComplete` | `function` |  | Called when the last piece has left, after `show` turned off. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextFlipReveal | `text-flip-reveal` |  |  |  |

## Usage

Wrap the text of a heading. Chain the next line with `delay`.

The sample also uses `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/text-flip-reveal @gelatin-ui/button
```

```tsx title="hero-heading.tsx"
import { TextFlipReveal } from "@/components/pro/text/text-flip-reveal";
import { Button } from "@/components/ui/button";

export function HeroHeading() {
  return (
    <section className="flex max-w-2xl flex-col items-start gap-4 py-16">
      <p className="font-mono text-xs tracking-widest text-muted-foreground uppercase">
        <TextFlipReveal trigger="mount">
          New in 2026
        </TextFlipReveal>
      </p>
      <h1 className="text-5xl leading-tight font-semibold tracking-tight">
        <TextFlipReveal by="line" trigger="mount" delay={0.1}>
          The component library that sweats the details
        </TextFlipReveal>
      </h1>
      <p className="text-lg text-muted-foreground">
        <TextFlipReveal trigger="mount" delay={0.45}>
          Accessible, fast, and tested frame by frame.
        </TextFlipReveal>
      </p>
      <Button>Get started</Button>
    </section>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/text-flip-reveal
```

It adds 22 registry items: 21 files, 3886 lines, and the npm packages `@base-ui/react`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `xstate`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Text Fade Reveal](https://gelatinui.com/components/text-fade-reveal.md)
- [Text Blur Reveal](https://gelatinui.com/components/text-blur-reveal.md)
- [Text Scramble](https://gelatinui.com/components/text-scramble.md)
- [Text Typewriter](https://gelatinui.com/components/text-typewriter.md)

## Motion

| Part | Motion |
| --- | --- |
| Enter | reveal · 400ms a piece · the pieces start one after another: 20ms a letter, 50ms a word, 120ms a line, and the last starts by 0.8s |
| Exit | revealExit · 250ms a piece · `show` off plays the text out, the last piece first, at half the step |
| Turn back | reveal · 400ms · a `show` change in the middle of a run moves every piece from where it is, with no stagger |
