Componentticket-stub3.83 KB gzipZero dependencies

Split Flap

Mechanical departure board with flipping characters and retro terminal styling.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add split-flap

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { SplitFlapBoard } from "@/components/ui/split-flap"; <SplitFlapBoard title="DEPARTURES CONCOURSE" rows={[{ time: "14:10", train: "BB-402", destination: "NEW YORK", track: "04", status: "ON TIME" }]} />

Source code

split-flap.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxsplit-flap.tsx640 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface SplitFlapRowData {  id?: string;  train: string;  time: string;  destination: string;  track: string;  status: "ON TIME" | "BOARDING" | "DELAYED" | "CANCELLED" | "DEPARTED" | "FINAL CALL" | string;  remarks?: string;} export interface SplitFlapCharProps extends React.HTMLAttributes<HTMLDivElement> {  char?: string;  size?: "sm" | "md" | "lg";

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { SplitFlapChar } from "@/components/ui/split-flap"; <SplitFlapChar />
PropTypeDescription
charstringConfigures char. (Default: " ")
size"sm" | "md" | "lg"Component size preset. (Default: "md")
color"default" | "accent" | "amber" | "green" | "destructive" | "muted"Configures color. (Default: "default")
delaynumberConfigures delay. (Default: 0)
soundbooleanToggles sound. (Default: false)
onFlip(char: string) => voidCallback invoked on flip.
onSettled() => voidCallback invoked on settled.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.