Time Field
A segmented input for typing a time.
Usage
TimeField is the time counterpart to DateField: the format string is split into editable hour/minute/second (and optional AM/PM) segments, each a spinbutton. The value is always a 24-hour HH:mm or HH:mm:ss string (or null while empty), even when displayed in 12-hour form. It's a custom component — not based on Base UI — sharing the Input styling.
Examples
Variants
Sizes
Formats
Choose 24-hour (HH) or 12-hour (hh with an a period segment), and add ss for seconds. The stored value stays 24-hour regardless of display.
Controlled
Drive the value with value + onValueChange. The callback fires with a "HH:mm"/"HH:mm:ss" string once the required segments are filled, or null when cleared.
With an icon
Use startSlot / endSlot to render adornments inside the field frame.
Disabled, read-only & error states
disabled greys out the field and blocks interaction; readOnly keeps it focusable and readable but prevents edits. Set aria-invalid to paint the error state — it's mirrored to data-invalid. The field also inherits disabled and the error state from a surrounding Field, so wrapping it in a Field marked invalid produces the same styling and is the better choice when you're also rendering a validation message.
RTL
Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior — roving focus, popup placement, and the like — follows the same direction.
For setup details and caveats, see the RTL guide.
API reference
Renders a <div role="group"> and forwards the remaining <div> props (id, aria-*, ref, …). The error styling is driven by the data-invalid attribute; setting aria-invalid marks the field invalid — it sets data-invalid for styling and conveys the state to assistive technology.
Accessibility
- The field is a
role="group"; each segment is arole="spinbutton"with anaria-label(hour/minute/second/period) andaria-valuenow/aria-valuetext. - ←/→ move between segments, ↑/↓ step the focused segment (toggling AM/PM on the period), Home/End jump to the first/last, Backspace/Delete clear; typing fills and auto-advances. The period segment also accepts a/p.
disabledremoves the segments from the tab order;readOnlykeeps them focusable but inert.- Segment focus styling uses a transition wrapped in
motion-reduce:, so it's skipped under reduced motion.