TimePicker
A field that opens a scrollable list of times; emits "HH:MM" (24h).
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A field that opens a scrollable list of times; emits "HH:MM" (24h).
Accessibility
Keyboard-navigable grid (arrow keys move days, PageUp/PageDown move months). The selected date is announced; the field has a clear label.
Install and import
npx shadcn@latest add @prism/time-picker
import { TimePicker } from '@/components/prism/TimePicker';
In a no-build prototype, read it from the bundle instead: const { TimePicker } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | — | |
description | string | — | |
value | string | — | "HH:MM" 24-hour string. |
defaultValue | string | — | |
onChange | (value: string) => void | — | |
step | number | — | Minutes between the listed options. Default 30. |
isEditable | boolean | — | Type any time ("14:07", "2:07 pm", "1407"); Enter or leaving the field commits it, and text that isn't a time reverts. The step list stays as suggestions. Default false (pick from the list only). |
hour12 | boolean | — | Display 12-hour labels with AM/PM (value stays 24h). |
placeholder | string | — | |
isDisabled | boolean | — | |
id | string | — | Names the field when there is no label. |
width | "xs" | "sm" | "md" | "lg" | "full" | — | Maximum width: "xs" (8rem) | "sm" (12rem) | "md" (20rem) | "lg" (36rem) | "full" (default). A cap, not a fixed width — it still shrinks on a phone or in a narrow FormRow column; the label and messages follow it. Sizes are the --field-width-* tokens. |
className | string | — |