Nozzle linePro
An Oxyn original after the user's reference: even thin lines in a steel-blue to coral to periwinkle gradient; a solid nozzle in the colour under it slides along and snaps to the levels. Tone red keeps the all-red look.
oxyn add nozzle-sliderThe 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
- A playful, minimal effort control: a calm line of evenly spaced coloured lines and a solid nozzle that slides along and lands on a level.
When not to use
- A card with the effort's name and what it does over a dense tick ruler: use Ruler card instead.
- A model's details with a notched reasoning slider (R steps it: use Reasoning panel instead.
- A chip with the current effort that opens a plain list of levels above it, the chosen one checked: use Effort list instead.
Installation
Nozzle line 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 nozzle-sliderUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
High
Even gradient lines; the solid nozzle sits on the centre stop in coral.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Low
On the first line, filled steel blue.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Max
At the far end, filled periwinkle.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Red
Tone red: every line and the nozzle in the one red.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Small
Size sm, four levels, no caption.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
NozzleSlider
| Prop | Type | Default | Description |
|---|---|---|---|
levels | Option<Vec<EffortLevel>> | Default::default() | The scale (Low … Max when `None`). |
value | Option<usize> | Default::default() | Controlled level. |
default_value | usize | 2 | Starting level when uncontrolled. |
strokes | usize | 37 | How many lines (odd counts put a line under the centre). |
tone | String | "gradient" | `"gradient"` (default, the reference colours) or `"red"`. |
size | String | "md" | `"sm"`, `"md"` (default) or `"lg"`. |
caption | bool | true | Show the level's name under the line. |
label | String | "Thinking effort" | Accessible name. |
on_change | EventHandler<usize> | — | The level changed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ←or→ · HomeorEnd | One level, or the ends; the nozzle springs to the stop |
| Drag | The nozzle follows the pointer and snaps to the nearest stop |
| Click | The nozzle jumps to the nearest level |
Accessibility
- role=slider with the level's name as value text; the lines and the nozzle are decoration.
- The level is named in the caption and the value text, so it never rests on colour; light-mode line colours keep 4:1 on white.
Responsive behaviour
- 440 px up to its container; lines are placed by percentage, so they close up on narrow screens.
Edge cases (spec)
440 px up to its container; lines are placed by percentage, so they close up on narrow screens (390 px fits).
Notes for AI
- Import
NozzleSliderfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
NozzleSliderElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.