# Split-Flap

> Text that flips into place like a departure board.

Every character flaps through the alphabet to its new value. For arrival boards, countdowns, live statuses, scoreboards and launch pages.

- Family: Originals
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/split-flap/
- 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 split-flap
```

It installs to `components/galactrex/split-flap.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 { SplitFlap } from "@/components/galactrex/split-flap";

<SplitFlap text="Boarding" length={10} />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` | `string` | — | The text to show; shown in capitals. |
| `length` | `number` | — | Pad or cut to this many cells so the board keeps its width. |
| `charset` | `string` | — | The order the flaps run through. |
| `flapMs` | `number` | `70` | Ms per flap. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Board.** Several rows with a fixed `length` each.
- **Clock.** Feed it the time every second.

## Accessibility

- The final text is read once from a visually hidden copy; the flaps are aria-hidden.

## Motion

- Each flap is two rotateX halves in 3D; only transforms animate.
- Reduced motion: characters change in place.
