Time Picker
Popover hour/minute (and optional second) selection, 12h or 24h.
Import
tsx
import { TimePicker } from "@cooud-ui/ui";
bash
npx cooud-ui add time-picker
Examples
API Reference
Generated from the component's exported types.
TimePickerProps
| Prop | Type | Default | Description |
|---|---|---|---|
value | TimeValue | string | — | Controlled value — a `{ hours, minutes, seconds }` object (24h `hours`) or a `"HH:mm"` / `"HH:mm:ss"` string. |
defaultValue | TimeValue | string | — | Initial value for uncontrolled usage. |
onChange | (value: TimeValue) => void | — | Fired with the normalized `{ hours, minutes, seconds }` whenever the time changes. |
hourCycle | 12 | 24 | 12 | `12` renders a 1–12 hour column plus an AM/PM column; `24` renders a 0–23 column. |
minuteStep | number | 1 | Granularity of the minute column, in minutes. |
showSeconds | boolean | false | Render a seconds column. |
secondStep | number | 1 | Granularity of the seconds column, in seconds. |
placeholder | string | "Select time" | Text shown on the trigger when no value is set. |
disabled | boolean | false | Disable the trigger and the whole panel. |
aria-label | string | — | Accessible name for the trigger when there is no visible label. |
className | string | — | Extra classes for the trigger button. |
contentClassName | string | — | Extra classes for the popover panel. |
id | string | — | Native id for the trigger. |
align | "start" | "center" | "end" | "start" | Popover alignment relative to the trigger. |