Skip to main content

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 bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
labelstring—
descriptionstring—
valuestring—"HH:MM" 24-hour string.
defaultValuestring—
onChange(value: string) => void—
stepnumber—Minutes between the listed options. Default 30.
isEditableboolean—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).
hour12boolean—Display 12-hour labels with AM/PM (value stays 24h).
placeholderstring—
isDisabledboolean—
idstring—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.
classNamestring—