Componentticket-stub3.83 KB gzipZero dependencies
Split Flap
Mechanical departure board with flipping characters and retro terminal styling.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add split-flapOr install the full npm package:
npm install bigbulluiUsage
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 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| char | string | Configures char. (Default: " ") |
| size | "sm" | "md" | "lg" | Component size preset. (Default: "md") |
| color | "default" | "accent" | "amber" | "green" | "destructive" | "muted" | Configures color. (Default: "default") |
| delay | number | Configures delay. (Default: 0) |
| sound | boolean | Toggles sound. (Default: false) |
| onFlip | (char: string) => void | Callback invoked on flip. |
| onSettled | () => void | Callback invoked on settled. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |