Time input
Choose a single time or a start and end time.
Recommended API
| Property or element | Type | Example initial value | Description |
|---|---|---|---|
Hour and minute | Number fields | 09:00 draft | Edit the time in 24-hour format inside the popover. |
name and value | HTML attributes | time-field · empty | Submit the confirmed time as HH:mm. |
States
| State | Trigger | Result |
|---|---|---|
editing | Activate the field. | Edit the draft and apply it to update the field. |
dismissed | Press Escape or click outside. | The previous confirmed value is preserved. |
Svelte implementation guidance
Open a time panel, enter hours and minutes in 24-hour format, then apply. Escape or an outside click cancels the edit.
Use the supplied example to integrate the picker. Keep the trigger accessible, preserve focus on dismissal, and verify keyboard and touch input.
CSS variables
| Variable | Type | Default | Description |
|---|---|---|---|
--q-text | color | #28302a | Main text and foreground color. |
--q-muted | color | #70776f | Color for secondary text. |
--q-font-size | length | 13px | Base size for the component text. |
--q-accent | color | #344e41 | Accent for active controls, indicators and focus. |
--q-surface | color | #ffffff | Surface for controls and cards. |
--q-border | color | #dce0d8 | Color for outlines and dividers. |
--q-radius | length | 10px | Base corner radius. |
--q-gap | length | calc(var(--q-space) * 2) | Space between items, based on the spacing unit. |
--q-control-px | length | calc(var(--q-space) * 4) | Horizontal padding for controls. |
--q-control-py | length | calc(var(--q-space) * 2.5) | Vertical padding for controls. |
--q-space | length | 4px | Base unit for gaps and padding. |