Skip to content
Back

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-dial
3:00 PM Monday in Karachi, 2 of 4 cities at work
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

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.

Terminal
oxyn add time-dial

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Team

Four cities, home in Karachi.

3:00 PM Monday in Karachi, 2 of 4 cities at work
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

24h

24-hour readout, five cities.

15:00 Monday in Karachi, 2 of 5 cities at work
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Quiet

Quiet hours band (Oxyn plus).

3:00 PM Monday in Karachi, 2 of 4 cities at work
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Bounded

Rubber-bands past the bounds.

3:00 PM Monday in Karachi, 2 of 4 cities at work
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

TimeDial

PropTypeDefaultDescription
citiesrequiredVec<City>—Two to five cities.
valuei32600UTC minutes from midnight on the reference day.
homeOption<String>Default::default()Home city id (defaults to the first).
minOption<i32>Default::default()Earliest UTC minute.
maxOption<i32>Default::default()Latest UTC minute.
weekdayu81Weekday of the reference day (0 = Sunday).
hour_cycleString"12"`12` · `24`.
working_hours(i32, i32)(540, 1080)Local working hours `[start, end]` in minutes.
quiet_hoursOption<(i32, i32)>Default::default()Oxyn plus: local quiet hours in minutes.
overlapboolDefault::default()Oxyn plus: show "Best overlap".
labelString"Time"Accessible name.
on_changeEventHandler<i32>—The destination after a release or a key.
on_home_changeEventHandler<String>—Home city chosen.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
→or↑A quarter hour forward
←or↓A quarter hour back
Page UporPage DownAn hour
HomeorEndStart / 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
TransitionDurationEasingReduced motion
Coast / settlespring ω = 14 (≈ 420 ms)critically dampedlands at once
Face rotate (web)420 mscubic-bezier(.16,1,.3,1)1 ms
Digit roll180 msease.outswap
Sun / moon300 ms fadeease.outswap
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 TimeDial from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: TimeDialEl in oxyn_gpui.
  • Props to set first: cities.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI