Skip to content

TimeInput

Editable time field with a clock-triggered column picker and optional seconds. Picker selections apply immediately; Done just closes the picker.

(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_090030);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_1430);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_1200);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
<TimeInput {...args} onChange={() => {}} value={TIME_0900} />
<TimeInput {...args} onChange={() => {}} value={TIME_0900} />
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(null);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
Outside business hours
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_2200);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
Time slot available
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_1000);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
() => {
const [sm, setSm] = useState<PlainTime | null>(TIME_0900);
const [md, setMd] = useState<PlainTime | null>(TIME_0900);
const [lg, setLg] = useState<PlainTime | null>(TIME_0900);
return (
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<TimeInput label="Small" onChange={setSm} size="sm" value={sm} />
<TimeInput label="Medium" onChange={setMd} size="md" value={md} />
<TimeInput label="Large" onChange={setLg} size="lg" value={lg} />
</div>
);
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
Select a time in your local timezone.
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
<TimeInput {...args} onChange={() => {}} value={TIME_0900} />
Click the clock to pick a time. Selections apply immediately.
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_0900);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
Available from 10 PM to 2 AM.
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(TIME_2200);
return <TimeInput {...args} onChange={setValue} value={value} />;
}
(args: TimeInputProps) => {
const [value, setValue] = useState<PlainTime | null>(null);
return <TimeInput {...args} hasClear onChange={setValue} value={value} />;
}

Editable time field with a clock-triggered column picker and optional seconds. Picker selections apply immediately; Done just closes the picker.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the input wrapper.
data-testidstring—Test ID applied to the input element.
descriptionReactNode—Supporting text displayed below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
hasClearbooleanfalseWhether to show a clear button when a value is set.
hasSecondsbooleanfalseWhether the input includes a seconds field.
htmlNamestring—HTML name attribute.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is loading.
isReadOnlybooleanfalseWhether the value is displayed without allowing focus or interaction.
label*string—Field label.
labelEndReactNode—Content shown at the end of the label row, such as a link. It renders outside the label, so it does not focus the control or change its accessible name. It stays visible when isLabelHidden is true.
labelIconIconComponent—Icon shown before the label.
labelTooltipReactNode—Tooltip content shown next to the label.
maxPlainTime—Latest allowed time.
minPlainTime—Earliest allowed time.
onBlur(event: FocusEvent<HTMLInputElement>) => void—Called when the input loses focus.
onChange*(value: PlainTime | null) => void—Called when the time value changes.
onFocus(event: FocusEvent<HTMLInputElement>) => void—Called when the input gains focus.
placeholderstring'Select a time'Placeholder text.
refRef<HTMLInputElement>—Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size.
statusInputStatus—Validation status displayed below the input.
stepnumber—Step increment in seconds for the time picker.
styleCSSProperties—Inline styles applied to the input wrapper.
value*PlainTime | null—Controlled time value. Pass null for an empty input.
isOptionalfalse—
isRequiredfalse—

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the input wrapper.
data-testidstring—Test ID applied to the input element.
descriptionReactNode—Supporting text displayed below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
hasClearbooleanfalseWhether to show a clear button when a value is set.
hasSecondsbooleanfalseWhether the input includes a seconds field.
htmlNamestring—HTML name attribute.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is loading.
isReadOnlybooleanfalseWhether the value is displayed without allowing focus or interaction.
label*string—Field label.
labelEndReactNode—Content shown at the end of the label row, such as a link. It renders outside the label, so it does not focus the control or change its accessible name. It stays visible when isLabelHidden is true.
labelIconIconComponent—Icon shown before the label.
labelTooltipReactNode—Tooltip content shown next to the label.
maxPlainTime—Latest allowed time.
minPlainTime—Earliest allowed time.
onBlur(event: FocusEvent<HTMLInputElement>) => void—Called when the input loses focus.
onChange*(value: PlainTime | null) => void—Called when the time value changes.
onFocus(event: FocusEvent<HTMLInputElement>) => void—Called when the input gains focus.
placeholderstring'Select a time'Placeholder text.
refRef<HTMLInputElement>—Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size.
statusInputStatus—Validation status displayed below the input.
stepnumber—Step increment in seconds for the time picker.
styleCSSProperties—Inline styles applied to the input wrapper.
value*PlainTime | null—Controlled time value. Pass null for an empty input.
isOptional*true—
isRequiredfalse—

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestring—Additional CSS class names applied to the input wrapper.
data-testidstring—Test ID applied to the input element.
descriptionReactNode—Supporting text displayed below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
hasClearbooleanfalseWhether to show a clear button when a value is set.
hasSecondsbooleanfalseWhether the input includes a seconds field.
htmlNamestring—HTML name attribute.
isDisabledbooleanfalseWhether the input is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the input is loading.
isReadOnlybooleanfalseWhether the value is displayed without allowing focus or interaction.
label*string—Field label.
labelEndReactNode—Content shown at the end of the label row, such as a link. It renders outside the label, so it does not focus the control or change its accessible name. It stays visible when isLabelHidden is true.
labelIconIconComponent—Icon shown before the label.
labelTooltipReactNode—Tooltip content shown next to the label.
maxPlainTime—Latest allowed time.
minPlainTime—Earliest allowed time.
onBlur(event: FocusEvent<HTMLInputElement>) => void—Called when the input loses focus.
onChange*(value: PlainTime | null) => void—Called when the time value changes.
onFocus(event: FocusEvent<HTMLInputElement>) => void—Called when the input gains focus.
placeholderstring'Select a time'Placeholder text.
refRef<HTMLInputElement>—Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size.
statusInputStatus—Validation status displayed below the input.
stepnumber—Step increment in seconds for the time picker.
styleCSSProperties—Inline styles applied to the input wrapper.
value*PlainTime | null—Controlled time value. Pass null for an empty input.
isOptionalfalse—
isRequired*true—