Launch in
--days
:
--hours
:
--minutes
:
--seconds
Installation
$ pnpm dlx shadcn@latest add @synccn/countdownFirst time in this project? Connect synccn with one command.
Usage
import { Countdown } from "@/components/ui/countdown";<Countdown to="2027-01-01" />API reference
Generated from the component's TypeScript types, so it always matches the code.
Countdown
Live countdown to a date. Shows `done` when it reaches zero. Safe to server-render: the digits fill in once the page loads.
PropTypeDescription
- torequired
string | number | DateTarget time.
- done
React.ReactNodeDefault
"It's here"Shown when the time is reached.
- labels
booleanDefault
trueShow unit labels under the numbers.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA roles: timer
- ARIA attributes: aria-live
- Announces changes to screen readers
More display
CardSurface with header, content and footer slots.BadgeSmall status label with an optional dot.AvatarImage with initials fallback, presence dot and stacked groups.KbdKeyboard key for shortcuts and hints.SeparatorHorizontal, vertical or labelled divider.AccordionExpanding sections with smooth height animation.