Skip to content

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-slider
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

  • 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.

Terminal
oxyn add nozzle-slider

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

High

Even gradient lines; the solid nozzle sits on the centre stop in coral.

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

Low

On the first line, filled steel blue.

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

Max

At the far end, filled periwinkle.

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

Red

Tone red: every line and the nozzle in the one red.

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

Small

Size sm, four levels, no caption.

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

NozzleSlider

PropTypeDefaultDescription
levelsOption<Vec<EffortLevel>>Default::default()The scale (Low … Max when `None`).
valueOption<usize>Default::default()Controlled level.
default_valueusize2Starting level when uncontrolled.
strokesusize37How many lines (odd counts put a line under the centre).
toneString"gradient"`"gradient"` (default, the reference colours) or `"red"`.
sizeString"md"`"sm"`, `"md"` (default) or `"lg"`.
captionbooltrueShow the level's name under the line.
labelString"Thinking effort"Accessible name.
on_changeEventHandler<usize>—The level changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
←or→ · HomeorEndOne level, or the ends; the nozzle springs to the stop
DragThe nozzle follows the pointer and snaps to the nearest stop
ClickThe 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 NozzleSlider from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: NozzleSliderEl 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