Split Flap

Split Flap

A split-flap departure board — each character is a mechanical flap module that clatters forward through the alphabet until it lands on its target.

Installation

▸ Run the following command

npx shadcn@latest add https://www.mellowui.com/r/split-flap.json

▸ Or install manually

  1. Install dependencies: pnpm add motion
  2. Copy the source from the Code tab above.
  3. Place it at components/mellow/split-flap.tsx
  4. Import and use.

API Reference

PropTypeDefaultDescription
textstringText to display — flips character by character like a departure board.
lengthnumberFixed cell count; text is padded/truncated so the board never resizes.
charsetstring" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:.-'&"Characters each cell cycles through, in order.
stepMsnumber48Duration of one flap in ms.
sizenumber44Cell height in px.
trigger"scroll" | "mount""scroll"Start when scrolled into view, or immediately on mount.
classNamestringAdditional CSS classes.