Time Input
A keyboard-friendly time field with separate hours and minutes segments. Arrow keys step values, Tab moves between segments, and a hidden input is rendered when name is set so the field works inside a native form.
:
12 vs 24 Hour
Switch between formats with the format prop. The 12-hour version adds a small AM/PM toggle.
:
Installation
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | "HH:MM" (24h) or "HH:MM AM/PM" (12h). |
onChange | (value: string) => void | — | Called when the user types or steps a value. |
format | "12" | "24" | "24" | Clock format. |
showIcon | boolean | true | Render the leading clock icon. |
name | string | — | Adds a hidden input for native form submission. |
disabled | boolean | false | Disable the field. |