Countdown
A live countdown to a date, in a large or compact style.
Preview
3 workflows will keep running.
When to use
- Launches, sales and windows that close.
- Inside an announcement bar as the compact variant.
When not to use
- The time is approximate; write it out as a date.
- Precision does not matter; use relative time text.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/countdown
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Countdown
8 props
PropTypeDefault
target *string | number | Date—
unitsCountdownUnit[]order
variant"large" | "compact""large"
completeLabelReactNode"Live now"
onComplete(() => void)—
labelstring"Time remaining"
clock(() => number)Date.now
classNamestring—
toEpoch
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes timer semantics, with aria-hidden and aria-label kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/countdown.mdThe index of every part is at /llms.txt.