Time dialPro
Spin a 24-hour dial to pick a time and see which team cities are at work; the readout rolls and the sun turns into the moon.
oxyn add time-dialThe 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 meeting or hand-off time across time zones — when a human reviewer in London and an agent schedule in Karachi overlap.
- The user spins until enough cities are at work.
When not to use
- A time field with a list at a fixed step: use Time picker instead.
- iOS-style wheels for day and time: use Date wheel instead.
- One value or a range, with marks, named detents that pull the thumb, a live cost tag, a vertical form and a value bubble: use Slider instead.
Installation
Time dial 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-dialUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Team
Four cities, home in Karachi.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
24h
24-hour readout, five cities.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Quiet
Quiet hours band (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Bounded
Rubber-bands past the bounds.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
TimeDial
| Prop | Type | Default | Description |
|---|---|---|---|
citiesrequired | Vec<City> | — | Two to five cities. |
value | i32 | 600 | UTC minutes from midnight on the reference day. |
home | Option<String> | Default::default() | Home city id (defaults to the first). |
min | Option<i32> | Default::default() | Earliest UTC minute. |
max | Option<i32> | Default::default() | Latest UTC minute. |
weekday | u8 | 1 | Weekday of the reference day (0 = Sunday). |
hour_cycle | String | "12" | `12` · `24`. |
working_hours | (i32, i32) | (540, 1080) | Local working hours `[start, end]` in minutes. |
quiet_hours | Option<(i32, i32)> | Default::default() | Oxyn plus: local quiet hours in minutes. |
overlap | bool | Default::default() | Oxyn plus: show "Best overlap". |
label | String | "Time" | Accessible name. |
on_change | EventHandler<i32> | — | The destination after a release or a key. |
on_home_change | EventHandler<String> | — | Home city chosen. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| →or↑ | A quarter hour forward |
| ←or↓ | A quarter hour back |
| Page UporPage Down | An hour |
| HomeorEnd | Start / last quarter hour of the home city's day |
Accessibility
- The dial is a focusable role=slider with aria-valuenow in home-city minutes and a spoken aria-valuetext.
- Cities are buttons with aria-pressed for the home city; changes are announced politely.
- The SVG face and the readout are aria-hidden.
From the spec
The face is a focusable role=slider with aria-valuenow in home-city minutes and an aria-valuetext such as "9:30 AM Tuesday in London, 3 of 4 cities at work"; the SVG and the readout are aria-hidden. City rows are buttons with aria-pressed for the home city. Status is never colour only: each row says At work / Off / Quiet.
Motion & interaction
Every city rides the dial at its own local time; the home city is the knob with its code. Digits roll like an odometer; the sun turns into the moon at 18:00. A flick coasts and lands exactly on a quarter hour. Dragging past a bound stretches and springs back.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Coast / settle | spring ω = 14 (≈ 420 ms) | critically damped | lands at once |
| Face rotate (web) | 420 ms | cubic-bezier(.16,1,.3,1) | 1 ms |
| Digit roll | 180 ms | ease.out | swap |
| Sun / moon | 300 ms fade | ease.out | swap |
| Detent window | ±3 min | — | — |
Responsive behaviour
- From 600 px the dial and city list sit side by side; below that they stack.
- The dial is min(100%, 256 px) with touch-action none.
Edge cases (spec)
Half- and quarter-hour offsets (India +5:30, Nepal +5:45) work because offsets are minutes. Values past midnight keep counting (day notes stay right). Two cities with the same offset overlap; the list disambiguates. Narrow containers (< 600 px): dial over list. Dense panels (< 360 px): tighter rows. Touch: touch-action: none on the face.
Notes for AI
- Import
TimeDialfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
TimeDialElinoxyn_gpui. - Props to set first:
cities. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.