Skip to content
Data Input

TimeInput

Segmented time-of-day field.

TimeInput

Time-only segmented field (hour, minute, and day-period when applicable). No popover or calendar — the simplest of the date/time cluster. Values use Time from @internationalized/date.

Examples

Default

Pass a label and seed with defaultValue (or control via value / onChange).

Start
930AM
Demo.tsxtsx
import { Time } from '@internationalized/date';
import { TimeInput } from '@var-ui/react';

<TimeInput label="Start" defaultValue={new Time(9, 30)} />

Controlled

Keep the time in React state with value / onChange. Guard for null if the field can be cleared.

Start
930AM
Demo.tsxtsx
import { Time } from '@internationalized/date';
import { TimeInput } from '@var-ui/react';

<TimeInput label="Start" value={value} onChange={setValue} />

Props

Accessibility

Built on React Aria TimeField. Each time unit is a focusable spinbutton. Keep label visible, and use description / errorMessage so assistive tech gets the same help and validation copy as sighted users. Arrow keys adjust the focused segment.