Inputs

Time Picker

Scroll-based time picker with 12/24-hour modes, configurable step intervals, and optional seconds column.

24h with seconds

12h format

30 min steps

Installation

npx benflux-ui add time-picker

Usage

import { TimePicker, type TimeValue } from "@benflux-ui/react"

const [time, setTime] = useState<TimeValue | undefined>()

// 24h with seconds
<TimePicker value={time} onChange={setTime} showSecond />

// 12h format
<TimePicker value={time} onChange={setTime} use12Hours />

// Custom step intervals
<TimePicker value={time} onChange={setTime} minuteStep={15} secondStep={30} />

Props

PropTypeDefaultDescription
valueTimeValueControlled time value
onChange(value: TimeValue | undefined) => voidCallback when time changes
use12HoursbooleanfalseUse 12-hour format with AM/PM selector
showSecondbooleanfalseShow the seconds column
hourStepnumber1Step interval for hours
minuteStepnumber1Step interval for minutes
secondStepnumber1Step interval for seconds
placeholderstringPlaceholder text for the trigger button
disabledbooleanfalseDisable the picker