v0.1 public beta early access on GitHub
Home / Components / countdown

CountdownAndroid

Live countdown with per-digit tick animation, compact and labeled-block layouts, completion haptic.

$ npx lumioui add countdown
import { Countdown } from "@/components/ui/countdown/countdown";
Props7
to Date | number Target time — epoch ms or Date. The display clamps at zero.
format? "auto" | "dhms" | "ms" Which units to render. "auto" (default) drops leading zero units — under an hour you get MM:SS, over a day DD:HH:MM:SS. "dhms" always shows all four, "ms" forces MM:SS.
compact? boolean Compact "2d 4h 12m" text instead of the colon clock. Inline layout only.
layout? "inline" | "blocks" "blocks" renders each unit as a labeled card; default "inline" clock.
onComplete? () => void Fires once when the countdown reaches zero.
textClassName? string Text classes for the digits.
className? string
Countdown — Blocksblocks.tsx
countdown/variants/blocks.tsx open

Live countdown with per-digit tick animation, compact and labeled-block layouts, completion haptic.

Countdown — Compactcompact.tsx
countdown/variants/compact.tsx open

Live countdown with per-digit tick animation, compact and labeled-block layouts, completion haptic.