Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Split Flap

ProNew

A 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

PropTypeDefault
value*string

Text to show. Lowercase letters are displayed as capitals.

—
lengthnumber

Number of cells. Shorter values are padded so the board never changes width.

—
speednumber

Milliseconds for a single flap to fall.

45
staggernumber

Milliseconds between one cell starting and the next.

40
maxFlipsnumber

Most characters a cell turns through before it lands. Longer journeys skip ahead.

12
charsetstring

Characters on each drum, in the order they flip.

CHARSET
classNamestring—

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.