Components › Display
Timer
A countdown or stopwatch with steady digits and start, pause and reset.
Installation
npx plankui@latest add timerUsage
import { Timer } from "@/components/ui/timer";
<Timer duration={25 * 60} onComplete={notify} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| duration | number | Count down from this many seconds. Leave out for a stopwatch. | |
| autoStart | boolean | false | Start running on mount. |
| onComplete | () => void | Called once when a countdown reaches zero. | |
| controls | boolean | true | Show start, pause and reset. |
| label | string | "Countdown" or "Stopwatch" | Accessible name. |