About
A split-flap board, like an old departures board. Each character flips through the alphabet to its next letter, so every change runs across the board in a ripple of flips. It cycles through sets of rows, jumps ahead on a click, and a hovered row flips to a second message.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Flap Board to your project and fits it to your theme.
Code
How Flap Board is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { FlapBoard } from "@/components/ui/flap-board";
const settings = {
interval: 6,
speed: 55
};
/* The demo's Google Fonts. In a Next.js app, use next/font/google instead. */
if (typeof document !== "undefined" && !document.getElementById("flap-board-fonts")) {
const style = document.createElement("style");
style.id = "flap-board-fonts";
style.textContent = "@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@100..900&family=JetBrains+Mono:wght@100..800&display=swap'); .rh-inter-tight { font-family: 'Inter Tight', sans-serif; } .rh-jetbrains-mono { font-family: 'JetBrains Mono', monospace; }";
document.head.appendChild(style);
}
const type = { className: "rh-inter-tight", style: { fontFamily: "'Inter Tight', sans-serif" } };
const mono = { className: "rh-jetbrains-mono", style: { fontFamily: "'JetBrains Mono', monospace" } };
// Kept outside the component, so the board isn't reset on every render.
const SETS = [
["06:20 LOS ANGELES", "09:45 NEW YORK", "14:10 LONDON", "17:35 TOKYO", "22:05 LISBON"],
["NOW BOARDING", "IDEAS THAT", "MOVE PEOPLE", "", "SAY HELLO"],
["STUDIO HOURS", "MON TO FRI", "9:00 TO 18:00", "", "COFFEE ALWAYS"],
];
const ALTERNATES = [["ON TIME GATE 4", "DELAYED GATE 12", "ON TIME GATE 7", "BOARDING GATE 2", "ON TIME GATE 9"]];
function DemoContent(props: Partial<typeof settings> = {}) {
const v = { ...settings, ...props };
return (
<main className={`${type.className} grid min-h-svh place-items-center bg-[#0e0e0f] px-5 py-16 text-[#f1ead8]`}>
<div className="grid justify-items-center gap-10">
<FlapBoard
sets={SETS}
alternates={ALTERNATES}
columns={18}
interval={Number(v.interval)}
speed={Number(v.speed)}
className={`${mono.className} text-[clamp(13px,2.05vw,30px)] font-medium [--flap:#1c1c1f]`}
/>
<p className="max-w-[26rem] text-center text-[15px] leading-[22px] text-[#f1ead8]/60">Click the board to flip to the next message. Point at a departure to see its gate.</p>
</div>
</main>
);
}
/** The demo in its own colours, filling the frame. */
export default function Demo(props: Partial<typeof settings> = {}) {
return (
<div className="min-h-svh w-full" style={{ background: "#0e0e0f" }}>
<DemoContent {...props} />
</div>
);
}
















