Progress
Show how much of a known task is complete.
A launch countdown with rolling digits that morphs into a live state at zero.
npx shadcn@latest add @silicon-ui/countdownnpx shadcn@latest add @silicon-ui/countdownInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/countdown/countdown.tsxcomponents/silicon-ui/countdown/countdown.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
target*The moment to count down to. A number is epoch milliseconds, a Date is used as is, and an ISO string with `Z` or an offset such as `2026-10-06T10:00:00-07:00` is exact. A string without an offset is wall time in `timeZone`, or UTC when no zone is given, so the result never depends on the visitor's own time zone. | Date | number | string | — |
timeZoneIANA zone for a target string without an offset, such as "America/Los_Angeles". Daylight saving is resolved for the target date. | string | — |
unitsUnits to show, largest first. The largest unit absorbs the rest, so hours can pass 24 when days are left out. | CountdownUnit[] | DEFAULT_UNITS |
variantLarge digits with unit labels, or one compact line for banners and table cells. | "large" | "compact" | "large" |
completeLabelShown once the target passes. The digits morph into it. | ReactNode | "Live now" |
onCompleteFires once, the moment the countdown reaches zero while mounted. It fires on time even when the tab is hidden. | () => void | — |
labelAccessible name, such as "Keynote starts in". | string | "Time remaining" |
clockClock source in epoch milliseconds. Pass a server-synced clock when the visitor's device time cannot be trusted. | () => number | systemClock |
ref | Ref<HTMLDivElement> | — |
className | string | — |