# Timer

A countdown or stopwatch with steady digits and start, pause and reset. PlankUI component for React 19 and Tailwind CSS v4. Category: Display.

## Install

```bash
npx plankui@latest add timer
```

## Usage

```tsx
import { Timer } from "@/components/ui/timer";

<Timer duration={25 * 60} onComplete={notify} />
```

## Props

| 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. |

Source: https://github.com/VectorLabsHQ/plankui/blob/main/components/ui/timer.tsx
