Theme splitPro
Oxyn original: the theme in use and a candidate over one sample window, a divider you drag between them, then Use to swap.
oxyn add theme-splitCompare themes
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.
Rendered from Rust at build time · goes live when visible
When to use
- Compare the theme in use with a candidate on the same window, side by side, before switching.
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 Accent and density instead.
Installation
Theme split 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 theme-splitUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Light against Midnight, divider in the middle.
Compare themes
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Dark vs contrast
Dark against Contrast with the divider pulled left.
Compare themes
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Moss vs plum
Two tinted darks side by side.
Compare themes
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ThemeSplit
| Prop | Type | Default | Description |
|---|---|---|---|
default_current | String | "light" | The theme in use (left). |
default_candidate | String | "midnight" | The candidate (right). |
default_split | f64 | 50.0 | Divider position in % (8–92). |
on_apply | EventHandler<String> | — | The candidate was put to use (its key). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Candidate dots, the divider, Centre, Use |
| LeftorRight on the divider | Move it one step |
| HomeorEnd | Divider to either edge |
| Enter on Use | Swaps: the candidate is in use |
Accessibility
- The divider is a native range input labelled with both themes, so drag, keys and screen readers share one control.
- Candidates are a radio group; the theme in use is disabled there.
- Use and Centre say what happened in a polite live note.
Responsive behaviour
- 560 px card; the sample's sidebar narrows under 480 px.
Edge cases (spec)
The sample's sidebar narrows under 480 px.
Notes for AI
- Import
ThemeSplitfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ThemeSplitElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.