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';Playground
Props
<TimePicker defaultValue="09:00" minuteStep={15} />Examples
Reminder time
States
defaultinvalidloadingsize="sm"size="md"size="lg"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | 24-hour "HH:mm", whatever the display format. |
| defaultValue | string | — | 24-hour "HH:mm", whatever the display format. |
| onValueChange | ((value: string) => void) | — | 24-hour "HH:mm", whatever the display format. |
| minuteStep | number | 1 | Minutes per step for the arrow keys and the picker. |
| min / max / required / name | string | boolean | — | Native attributes; Form validates them. |
| clearable | boolean | — | Shows a clear button while there is a value. Clearing fires onChange with "". |
| invalid | boolean | — | |
| leadingAddon | string | — | |
| leadingIcon | React.ReactNode | — | |
| loading | boolean | — | Spinner in the trailing slot and aria-busy on the input. |
| showCount | boolean | — | Shows a "12/80" counter; needs maxLength. Announced politely near the limit. |
| size | 'sm' | 'md' | 'lg' | — | |
| trailingAddon | string | — | |
| trailingIcon | React.ReactNode | — | |
| wrapperClassName | string | — |
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.
On iOS & Android: DateTimeField
@nexub/react-nativeAlpha
import { DateTimeField } from '@nexub/react-native';
<DateTimeField label="Remind me at" mode="time" value={at} onValueChange={setAt} />Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| Picker | Native time input. | The platform time picker: mode="time". |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
DateTimeField props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | Date | string | null | — | The value; null is empty. A 'YYYY-MM-DD' string is read too. Leave it out for an uncontrolled field. |
| defaultValue | Date | string | null | — | 11.8: the starting value of an uncontrolled field, in the same shape as value. |
| onValueChange | DateTimeFieldChangeHandler | — | Called with the new Date, or null when cleared. |
| granularity | 'day' | 'day' | 11.8: 'month' or 'year' picks a whole month or year instead: see DateTimeFieldPeriodProps. |
| labelrequired | string | — | Visible label above the field; also its accessible name and the picker sheet's title. |
| mode | 'date' | 'time' | 'datetime' | 'date' | What the platform picker edits. 11.8: 'datetime' picks a date and then a time in one field. |
| minDate | Date | — | Earliest date the picker allows. With month or year granularity, earlier months or years are disabled. |
| maxDate | Date | — | Latest date the picker allows. With month or year granularity, later months or years are disabled. |
| placeholder | string | messages.pickDate (pickMonth / pickYear for those granularities) | Text shown while empty. |
| disabled | boolean | false | 11.8: dimmed, can't be opened or cleared, and read as disabled. |
| readOnly | boolean | false | 11.8: shows the value, but the picker can't open and the value can't be cleared. Still focusable. |
| invalid | boolean | false | 11.8: red outline, and the field is marked invalid for screen readers. Give error for a message too. |
| error | string | — | 11.8: error message under the field: red outline, announced, read as the field's hint. |
| size | Extract<ControlSize, 'md' | 'lg' | 'xl'> | 'lg' | 11.8: field height (the TextField sizes). |
| locale | string | the provider's locale | 11.8: BCP 47 locale for the field's text and the iOS picker. |
| disabledDates | DateMatcher | DateMatcher[] | — | 11.8: days that can't be picked: one rule or a list (see DateMatcher), as web. The platform
picker can't grey days out, so picking one keeps the old value and says the day is unavailable.
Presets on such days are disabled. |
| presets | { label: string; date: Date }[] | — | 11.8: quick picks shown as chips under the field (Today, Tomorrow…); a tap sets the value.
In datetime mode the time of the current value (or defaultTime) is kept. Not for time mode
or month and year granularity. |
| minuteStep | number | 1 | 11.8: minutes between choices in time and datetime modes. iOS uses it as the wheel's interval; elsewhere the picked time is rounded to it. |
| clearable | boolean | false | 11.8: a clear button inside the field while it has a value; clearing calls onValueChange(null). |
| loading | boolean | false | 11.8: spinner at the end of the field, and busy for screen readers. |
| defaultTime | string | '09:00' | 11.8: 24-hour "HH:mm" time a date gets when it is picked before any time (date and datetime modes). |
| timeZone | string | — | 11.8: IANA time zone ('Europe/Paris') the value is shown and picked in, with its name under
the field. The value is still an instant (Date). |
| leadingIcon | React.ComponentType<NativeIconProps> | Calendar (Clock in time mode) | 11.8: icon at the start of the field. |
| trailingIcon | React.ComponentType<NativeIconProps> | — | 11.8: icon at the end of the field. |
| leadingAddon | React.ReactNode | — | 11.8: text or a node at the start of the field, e.g. "From". A string is read with the value. |
| trailingAddon | React.ReactNode | — | 11.8: text or a node at the end of the field, e.g. "local time". A string is read with the value. |
| style | StyleProp<ViewStyle> | — | — |