Flap Board
betaA split-flap display, like an old departures board: each character flips over through the set to its new value, rippling along the row.
- Display
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add flap-boardnpm packages installed: class-variance-authority.
import { FLAP } from "@/components/ui/flap-board";Default
Departures
Clock Face
<FlapBoard>
| Prop | Type | Default |
|---|---|---|
value (required)The text to show. | string | — |
charsetThe characters, in the order the flaps turn through them. | string | FLAP_BOARD_CHARSET |
lengthHow many cells. Defaults to the length of | number | — |
maxFlipsThe most flips a cell makes for one change. Default 10. | number | 10 |
size | "sm" | "md" | "lg" | "md" |
speedMilliseconds per flip. Default 90. | number | 90 |
staggerMilliseconds between one cell starting and the next. Default 40. | number | 40 |
Plus every attribute of <span> except children.
Read once, as text: a visually hidden polite live region holds the value, so a change is announced when it is made rather than character by character, and the flipping cells are aria-hidden. Under reduced motion the characters change at once. The board always runs left to right, as the real thing does, even in a right-to-left page.
7/7
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes