Split-flap Board

The station departures board: every character a flap that clatters through the alphabet.

Category
Creative
Access
Free with an account
Source
157 lines · one file
States
4 drawn
Added
3 Nov 2026

The decision inside it

Flaps only turn forward, like the real thing

Changing A to C turns twice and C to A goes the long way round, every column a beat after the last. Screen readers hear each row's final words once, not a stream of letters, and with reduced motion the text just appears.

When to use it

Use Split-flap Board for launch countdowns, status boards and headlines that should feel mechanical. For text that types itself use Typewriter.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Split-flap Board for this.
Install it: npx shadcn@latest add @liro/split-flap
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/split-flap.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/release-board.tsx
import { SplitFlap } from "@/components/ui/split-flap";

export function ReleaseBoard({ status }: { status: "ON TIME" | "SHIPPING" | "LIVE" }) {
  return <SplitFlap rows={["MADGIXS 4.0", status]} width={12} size={32} />;
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
rowsstring[] YesOne string per row.
widthnumber NoCharacters per row; shorter rows are padded with spaces. Default: the longest row.
speednumber NoMilliseconds per flap. Default 42.
staggernumber NoDelay between columns starting, in ms. Default 22.
charsetstring NoThe characters a flap can show, in the order it turns.
sizenumber NoSize of one cell in pixels (its height). Default 34.
tonesRecord<string, string> NoColours for single cells, by "row:col", for status words.

Dependencies

npm packages

clsxframer-motiontailwind-merge

Liro foundations, installed alongside it

liro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Flipping in
  • Settled
  • Changing
  • Headline

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances