Components

Time Picker ​

Time pickers provide a compact controlled input for choosing one time value.

Basic Usage ​

Use a controlled value when the selected time needs to stay in sync with broader form state.

Empty State ​

An empty placeholder is useful when the time should be chosen explicitly rather than prefilled.

States ​

Show invalid and disabled states when the picker is used inside forms.

API ​

Slots ​

NameDescription
startOverrides the default clock icon
(default)Additional pk-option items append after the generated list
endPresentational decoration before the expand chevron

Props ​

NameDescription
ariaLabelAccessible name for the trigger when no visible label is present.
Type string | null
Default null
clearableAlias of with-clear — shows a clear control when the value is non-empty.
Type boolean
Default false
customErrorCustom validation message; also settable via setCustomValidity().
Type string | null
Default null
defaultValueInitial value before user interaction (form reset baseline).
Type string
defaultValuesInitial multi values before user interaction. Property-only.
Type string[]
Default []
disabledDisables the control and excludes it from constraint validation.
Type boolean
Default false
invalidMarks the control invalid (visual + ARIA).
Type boolean
Default false
isInvalidAlias for invalid.
loopFocusWhether arrow-key focus loops from the last option back to the first (and vice versa). Base UI Select has no equivalent; default: false.
Type boolean
Default false
multipleAllow more than one option to be selected (tag display).
Type boolean
Default false
nameName submitted with form data.
Type string | null
Default null
openWhether the listbox is open. Prefer show() / hide() for animated transitions.
Type boolean
Default false
placeholderPrompt shown when nothing is selected. Empty by default.
Type string
placementPreferred listbox placement; may flip to stay in viewport.
Type PkPopupPlacement
Default bottom-start
requiredMarks the control as required for form submission.
Type boolean
Default false
sideOffsetGap between the trigger and listbox panel in px.
Type number
Default 4
sizeShared CP size scale for the closed trigger and list items.
Type PkSelectSize
Default default
valueSelected value (single-select). Empty string when cleared.
Type string
valuesSelected values when multiple is set. Property-only (not an attribute).
Type string[]
Default []
widthWhen full, the trigger stretches to the host width.
Type 'full' | undefined
withClearShows a clear control when the value is non-empty.
Type boolean
Default false

Methods ​

NameDescription
checkValidity()Runs constraint validation without showing the browser UI.
hide(source: PkOverlaySource)Closes the listbox.
reportValidity()Runs constraint validation and shows the browser UI when invalid.
resetValidity()Clears custom errors and re-syncs validity state.
setCustomValidity(message: string)Sets or clears a custom validation message.
show()Opens the listbox.

Events ​

NameDescription
onChangeNative change event when the selection changes.
onInputNative input event when the selection changes.
onPkAfterHideEmitted after the listbox closes and exit motion finishes.
onPkAfterShowEmitted after the listbox opens and enter motion finishes.
onPkChangedetail.value Some facades also expose value sugar via onChange.
Type { value: string, values: string[] }
onPkClearEmitted when the value is cleared via the clear control.
onPkHideEmitted when the listbox begins to close (cancelable).
Type { source: string }
onPkInvalidEmitted when constraint validation fails.
onPkOpenChangeEmitted when open changes after show/hide settles.
Type { open: boolean }
onPkShowEmitted when the listbox begins to open.

CSS Custom Properties ​

NameDescription
--pk-select-anchor-widthPanel min-width; set from the trigger width while open.
--pk-select-decoration-sizeStart/end decoration glyph size.
Default 0.875rem
--pk-select-fillClosed trigger background.
Default var(--pk-color-slate-250)
--pk-select-fill-hoverClosed trigger hover background.
Default var(--pk-color-slate-300)

Custom States ​

NameDescriptionCSS selector
disabledThe control is disabled.:state(disabled)
invalidThe control currently fails constraint validation.:state(invalid)
optionalThe control is not required.:state(optional)
requiredThe control is required.:state(required)
user-invalidInvalid after the user has interacted with the control.:state(user-invalid)
user-validValid after the user has interacted with the control.:state(user-valid)
validThe control currently passes constraint validation.:state(valid)

CSS Parts ​

NameDescriptionCSS selector
controlTrigger control wrapper::part(control)
endHost end decoration container::part(end)
panelListbox panel::part(panel)
startHost start decoration container::part(start)
triggerSelect trigger button::part(trigger)
trigger-startMirrored start decoration from the selected option::part(trigger-start)

Dependencies ​

This component registers the following elements when it loads.

NameDescription
pk-option—
Edit this page
Last updated: Sep 9, 2026, 7:18 PM