Skip to content

Ruler cardPro

A card with the effort's name and what it does over a dense tick ruler: the ticks behind the capsule knob tint toward it, the knob snaps to the levels, and reset goes back to the default.

oxyn add effort-ruler

Max

Takes as long as the task needs

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 how hard the model thinks with one glance at a ruler.
  • The level's name and what it does sit above a ruler of dense ticks; the ticks behind the knob tint toward it, so the amount reads like a gauge.

When not to use

  • 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.
  • A “Select effort” pill that opens a popover with the level, the model it applies to, a dotted step slider and reset: use Effort pill instead.

Installation

Ruler card 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 effort-ruler

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

Max

At the top level the name turns red and every tick behind the knob carries the red, strongest next to it.

Max

Takes as long as the task needs

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

High

Mid-scale: the ticks past the knob stay grey; reset is off because High is where it returns.

High

Works through the steps

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

The first level: only the first tick is lit.

Low

Answers right away

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

Dense

72 ticks for a finer ruler; the knob still snaps to the five levels.

Max

Takes as long as the task needs

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

Narrow

320 px: the line wraps and the ruler keeps its ticks.

Max

Takes as long as the task needs

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

EffortRuler

PropTypeDefaultDescription
levelsOption<Vec<EffortLevel>>Default::default()The scale (Low … Max when `None`).
valueOption<usize>Default::default()Controlled level index.
default_valueOption<usize>Default::default()Starting level when uncontrolled (the top level when `None`).
resetOption<usize>Default::default()Where reset returns (the middle level when `None`).
ticksusize44How many ticks the ruler draws.
labelString"Thinking effort"The control's accessible name.
on_changeEventHandler<usize>—The level changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
←or→One level down or up
HomeorEndLowest or highest level
TabMoves to the reset button

Accessibility

  • The ruler is a slider: its value text is the level's name, so a screen reader says “High”, not “2”.
  • The status line says the new level and what it does after every change.
  • Reset is a real button named after the level it returns to; it is disabled when already there.

Responsive behaviour

  • 440 px card up to its container; under 340 px the heading tightens and the ruler's side padding drops.
  • Ticks are placed by percentage, so the ruler fits any width.
Edge cases (spec)

Ticks are placed by percentage, so the ruler fits any width; under 340 px (container query) the heading tightens and the well's side padding drops to 14 px.

Notes for AI

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