Skip to content
nexubDesign System
v11.9.0

Components · Form & Input

Time Picker

BetaAdded v6.2.0

A time field on the native time input: 12 or 24 hours from the reader’s locale, and the platform picker on phones.

import { TimePicker } from '@nexub/react';
View as Markdown

Playground

Props

TSX
<TimePicker defaultValue="09:00" minuteStep={15} />

Examples

Reminder time

States

  • default
  • invalid
  • loading
  • size="sm"
  • size="md"
  • size="lg"

Props

Props
PropTypeDefaultDescription
valuestring—24-hour "HH:mm", whatever the display format.
defaultValuestring—24-hour "HH:mm", whatever the display format.
onValueChange((value: string) => void)—24-hour "HH:mm", whatever the display format.
minuteStepnumber1Minutes per step for the arrow keys and the picker.
min / max / required / namestring | boolean—Native attributes; Form validates them.
clearableboolean—Shows a clear button while there is a value. Clearing fires onChange with "".
invalidboolean—
leadingAddonstring—
leadingIconReact.ReactNode—
loadingboolean—Spinner in the trailing slot and aria-busy on the input.
showCountboolean—Shows a "12/80" counter; needs maxLength. Announced politely near the limit.
size'sm' | 'md' | 'lg'—
trailingAddonstring—
trailingIconReact.ReactNode—
wrapperClassNamestring—

Accessibility

Keyboard

  • ArrowUp / ArrowDown

    Changes the focused segment (hour, minute, AM/PM).

  • ArrowLeft / ArrowRight

    Moves between segments.

Notes

  • Native `<input type="time">`: screen readers announce each segment, and phones open their own time picker.