Time pickerPro
A time field with a list at a fixed step; a later time rises in, an earlier one drops, and the list opens on the chosen time.
oxyn add time-pickerThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Pick a time of day: when a recurring agent runs, a reminder, a meeting.
- The list is short enough to scan and fixed to sensible steps.
When not to use
- Pick one option in the text field's look: use Select instead.
- iOS-style wheels for day and time: use Date wheel instead.
- Spin a 24-hour dial to pick a time and see which team cities are at work: use Time dial instead.
Installation
Time picker is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add time-pickerUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Open
Every 15 minutes.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
24h
24-hour, every 30 minutes.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Window
Working hours with a zone tag (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
TimePicker
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | String | — | Label. |
value | Option<String> | Default::default() | `HH:mm` (24-hour). |
description | Option<String> | Default::default() | Helper copy. |
placeholder | String | "Select a time" | Placeholder. |
minute_step | u32 | 15 | Minutes between options: 1 · 5 · 10 · 15 · 30. |
format | String | "12h" | `12h` · `24h`. |
window | Option<String> | Default::default() | Oxyn plus: limit to `HH:mm-HH:mm`. |
zone | Option<String> | Default::default() | Oxyn plus: a zone tag after the value (`PKT`). |
open | bool | Default::default() | Start open (review sheets). |
disabled | bool | Default::default() | Disabled. |
on_change | EventHandler<String> | — | Changed: `HH:mm`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace | Open, or pick the active time |
| ↓or↑ | Open, then move through times (wraps) |
| Esc | Close |
Accessibility
- Trigger: aria-haspopup=listbox, aria-expanded, aria-controls, labelled by the label and a hidden value.
- Options carry aria-selected; the list scrolls itself, never the page.
From the spec
Same pattern as select.md: a trigger button with aria-haspopup=listbox, aria-expanded, aria-controls and aria-activedescendant; options carry aria-selected. Labels read the formatted time ("9:30 AM").
Motion & interaction
The shown time rises in from below when the new time is later and drops from above when it is earlier. The list opens scrolled to the selected time and scrolls itself, never the page.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| List open | 180 ms | ease.out | 80 ms fade |
| Value rise / drop | 180 ms, blur 3 → 0 | ease.out | crossfade |
| Highlight | 214 ms spring.snap | spring | jump |
Responsive behaviour
- The list spans the field and caps at 250 px.
Edge cases (spec)
A value off the step selects the nearest option for the highlight but keeps the exact value. 1- minute steps make 1,440 rows: the list stays virtual-friendly by capping height and scrolling. 12 AM / 12 PM read correctly. Narrow screens: the list spans the field.
Notes for AI
- Import
TimePickerfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
TimePickerElinoxyn_gpui. - Props to set first:
label. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.