Split Flap
ProNewA departure board whose cells flip forward one character at a time until they land.
Installation
pnpm dlx shadcn@latest add @viewport/split-flap
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| value* | stringText to show. Lowercase letters are displayed as capitals. | — |
| length | numberNumber of cells. Shorter values are padded so the board never changes width. | — |
| speed | numberMilliseconds for a single flap to fall. | 45 |
| stagger | numberMilliseconds between one cell starting and the next. | 40 |
| maxFlips | numberMost characters a cell turns through before it lands. Longer journeys skip ahead. | 12 |
| charset | stringCharacters on each drum, in the order they flip. | CHARSET |
| className | string | — |
Accessibility
- The text is exposed once to screen readers; the board itself is aria-hidden.
- Fixed cell count, so the board never changes width.
- Shows the final text immediately under reduced motion.