Components

Time Picker

A simple and intuitive time selection component with scrollable hour, minute, and AM/PM columns. Uses react-aria primitives for accessibility and focus management.

Installation

API Reference

TimePicker

PropTypeDefaultDescription
childrenReact.ReactNodeTrigger element (usually TimePickerTrigger)
onSelect(date: Date) => voidCallback when hour/minute/period selection updates

TimePickerTrigger

Extends Button props from react-aria-components.

PropTypeDescription
classNamestringCustom styles for the trigger button
...propsButtonPropsAll button props supported

TimeColumn (internal)

Not exported publicly. Renders the scrollable list for hours, minutes, and period.

Accessibility

  • Uses MenuTrigger and Popover from react-aria for proper ARIA roles and keyboard support.
  • Popover automatically manages focus and closes on selection.
  • Each time value is rendered as a button for full keyboard accessibility.
  • Scrollable regions keep navigation intuitive and friendly on touch devices.

Notes

  • Hours are displayed in 12-hour format with AM/PM toggles.
  • All columns are scrollable and optimized for vertical picking.
  • The helper toDate converts the selected values into a valid JavaScript Date.
  • onSelect fires immediately when any part of the time is chosen (hour, minute, or period).