Componentticket-stub0.47 KB gzipZero dependencies
FlipClock
Mechanical split-flap HH:MM clock whose digit cards flip on change with a blinking colon.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add flip-clockOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { FlipClock } from "@/components/ui/flip-clock"; <FlipClock time="14:30" />Source code
flip-clock.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxflip-clock.tsx59 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface FlipClockProps extends React.HTMLAttributes<HTMLElement> { time: string; // "HH:MM" className?: string;} export function FlipClock({ time = "", className, ...props }: FlipClockProps) { const digits = time.split(":"); return ( <div className={cn( "grid grid-cols-4 gap-1.5 text-center motion-reduce:transition-none", classNameProps
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { FlipClock } from "@/components/ui/flip-clock"; <FlipClock />| Prop | Type | Description |
|---|---|---|
| time | string | Configures time. (Default: "") |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |