Skip to content
Date & Time

Time Picker

Popover hour/minute (and optional second) selection, 12h or 24h.

Import

tsx
import { TimePicker } from "@cronus-ui/ui";
bash
npx cronus-ui add time-picker

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component TimePickerDefault layout:inline style:time-picker {
  value:"09:30"
  hourCycle:24
  aria-label:"Meeting time"
  label "Select time"
  text "Select time"
}

page "/audit/time-picker/default" type:custom {
  use TimePickerDefault
}

API Reference

Generated from the component's exported types.

TimePickerProps

Skip TimePickerProps props table
PropTypeDefaultDescription
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.
onValueChange
(value: TimeValue) => void—Fired with the normalized `{ hours, minutes, seconds }` whenever the time changes.
onChange
(value: TimeValue) => void—Called when the value changes.
hourCycle
12 | 2412`12` renders a 1–12 hour column plus an AM/PM column; `24` renders a 0–23 column.
minuteStep
number1Granularity of the minute column, in minutes.
showSeconds
booleanfalseRender a seconds column.
secondStep
number1Granularity of the seconds column, in seconds.
placeholder
string"Select time"Text shown on the trigger when no value is set.
disabled
booleanfalseDisable 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.