Stopwatch
Time something: start, pause, lap and reset. The reading is drawn every frame in tabular figures and measured from the clock, so a busy or hidden tab never loses time. The fastest and slowest laps are marked.
When to use
- Time tracking on a task or ticket.
- Timing an event, a call or a test run.
When not to use
- Counting down to a date; use the countdown.
- A background timer with no screen; store the start time instead.
Installation
pnpm dlx shadcn@latest add @caliper/stopwatch
Adds its 3 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
Stopwatch
2 props
formatStopwatch
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 and status semantics, with aria-live and aria-label kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/stopwatch.mdThe index of every part is at /llms.txt.