Skip to content
Back

Theme schedulePro

Oxyn original: Light, Dark, Sun or your own hours on a 24-hour strip; drag along it to preview the day and the sample turns with it.

oxyn add theme-schedule

Light and dark

Your hours: light 07:00–19:00. Turns dark in 1 h.

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

  • Let the app go light and dark by the clock – always, with the sun, or on your own hours – and show what any time of day will look like.

When not to use

  • Picture tiles we draw ourselves plus Your own, with Film, Static or Dither laid over the picture and a home screen preview: use Background picker instead.
  • Eight mini-window swatches: use Theme grid instead.
  • Oxyn original: use Theme split instead.

Installation

Theme schedule 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 theme-schedule

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

Default

Your hours, light 07:00–19:00, previewed at 18:00: an hour of light left.

Light and dark

Your hours: light 07:00–19:00. Turns dark in 1 h.

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

Follows the sun

Sun: light from sunrise to sunset; at 18:00 the sample has already turned dark.

Light and dark

Follows the sun: light 06:42–17:18. Turns light in 12 h 42 min.

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

Night owl

Light from 22:00 to 08:00, a window that wraps past midnight, previewed at 23:30.

Light and dark

Your hours: light 22:00–08:00. Turns dark in 8 h 30 min.

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

Always dark

Dark all day: the hour sliders rest.

Light and dark

Always dark.

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

ThemeSchedule

PropTypeDefaultDescription
default_modeString"custom"Starting mode (`light`, `dark`, `sun`, `custom`).
default_fromu32420Light from (minutes after midnight).
default_tou321140Dark from (minutes after midnight).
default_atu321080The previewed time (minutes after midnight).
on_changeEventHandler<(String, u32, u32)>—Mode or hours changed: (mode, from, to).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabModes, the strip, then the two hour sliders
LeftorRight on the stripPreview 15 minutes earlier or later
LeftorRight on a sliderMoves that hour by 15 minutes

Accessibility

  • Modes are a radio group; the summary line is a polite live region that says when the next switch comes.
  • The strip is a native range named Preview time; its value text gives the time and the theme it shows.
  • Hour sliders carry their time as aria-valuetext and are disabled outside Custom.

Responsive behaviour

  • 560 px card; the sample stacks over the sliders under 480 px.
Edge cases (spec)

The sample stacks over the sliders under 480 px.

Notes for AI

  • Import ThemeSchedule from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: ThemeScheduleEl in oxyn_gpui.
  • 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