---
title: "Text Split Flap"
description: "Each tile turns its flaps through letters until it shows the new text, like an airport split-flap board."
url: https://gelatinui.com/components/text-split-flap
markdown_url: https://gelatinui.com/components/text-split-flap.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-split-flap"
version: "2026-11-14"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Split Flap

> Each tile turns its flaps through letters until it shows the new text, like an airport split-flap board.

Page: https://gelatinui.com/components/text-split-flap

## When to use it

Best for: A short word, code, or number that flips to a new value tile by tile, as on a station or airport board.

- Pass the text as `children`; a new text flips each tile from its old character to the new one.
- Leave `trigger` at `"view"` for a headline that flips in when it comes into view; use `"mount"` to flip at once.
- Set `order` to choose the order in which the tiles start: `start`, `end`, `center`, `edges`, or `random`.
- Set `characters` to a smaller drum, such as `0123456789:` for a clock.

## When not to use it

- For a number that keeps its format while its digits change, use [Rolling Number](https://gelatinui.com/components/rolling-number.md).

## Notes for agents

- `children` must be a string.
- The default drum is a space, A–Z, 0–9, and `.,:;!?'-&/@#%`. A small letter, an accent, or an emoji is not on it: that tile flips once, straight to its target.
- A tile turns at most 10 flaps of 70ms, and the last tile starts within 0.48s, so a text lands in about 1.2s.
- The tiles are dark in both themes. Their size follows the font size: set `text-*` and a monospace font on the parent or with `className`.
- The text cannot be selected: it is a moving effect.

## Anatomy

```text
TextSplitFlap
```

## API reference

### TextSplitFlap

| 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 show. A new text flips each cell from its old character to the new one. |
| `trigger` | `"mount" \| "view"` | "view" | When the first flip runs: `view` (default) the first time it is on screen, `mount` at once. |
| `characters` | `string` | SPLIT_FLAP_CHARACTERS | The drum: the characters a cell turns through, in order. Default: a space, A–Z, 0–9, and the marks of a departure board. A character that is not on it flips once, straight to its target. |
| `order` | `"center" \| "edges" \| "end" \| "random" \| "start"` | "start" | The order in which the cells start: `start` (default, reading order), `end`, `center` (from the middle out), `edges` (from both ends in), or `random` (a fixed shuffle of each text). |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextSplitFlap | `text-split-flap` |  |  |  |

## Usage

Pass the text as children. A new text flips each tile to its new character.

```tsx title="gate-status.tsx"
import { TextSplitFlap } from "@/components/pro/text/text-split-flap";

type Flight = { code: string; city: string; gate: string };

export function GateStatus({ flight }: { flight: Flight }) {
  return (
    <div className="flex items-end justify-between gap-6 rounded-xl border p-4">
      <div className="flex flex-col gap-1">
        <span className="text-xs font-medium text-muted-foreground">
          {flight.code} to {flight.city}
        </span>
        <span className="text-sm font-medium">Gate</span>
      </div>
      <span className="font-mono text-3xl font-semibold">
        <TextSplitFlap trigger="mount" order="start">
          {flight.gate}
        </TextSplitFlap>
      </span>
    </div>
  );
}
```

## 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-split-flap
```

It adds 16 registry items: 15 files, 3017 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## 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 Scramble](https://gelatinui.com/components/text-scramble.md)
- [Rolling Number](https://gelatinui.com/components/rolling-number.md)
- [Clock](https://gelatinui.com/components/clock.md)

## Accessibility

Assistive tools read the new text once, never the characters that the flaps turn past.

## Motion

| Part | Motion |
| --- | --- |
| Flip | progress · each flap turns in 70ms on a linear clock; each half speeds up as it falls, as with gravity |
| Stagger | progress · the tiles start 40ms apart in `order`, all within 0.48s |
