Effort pillPro
A “Select effort” pill that opens a popover with the level, the model it applies to, a dotted step slider and reset.
oxyn add effort-pillHigh
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
- An effort control for a composer that starts unset: the pill reads "Select effort" until the user picks a level in a popover with a big, touch-friendly step slider.
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
Effort pill 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 effort-pillUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Open
The popover under the pill: the level, the model it applies to, and a fat slider with a dot per level.
High
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Unset
Nothing chosen yet: the pill reads “Select effort” in grey and the slider rests on the default.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Max
The thumb at the far end.
Max
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
EffortPill
| Prop | Type | Default | Description |
|---|---|---|---|
levels | Option<Vec<EffortLevel>> | Default::default() | The scale (Low … Max when `None`). |
value | Option<Option<usize>> | Default::default() | Controlled level (`None` inside = nothing chosen yet). |
default_value | Option<usize> | Default::default() | Starting level when uncontrolled. |
reset | usize | 2 | Where reset returns. |
model | String | "Atlas 6" | The model the effort applies to (a link-styled line under the level). |
default_open | bool | Default::default() | Starts open (for previews). |
on_change | EventHandler<usize> | — | The level changed. |
on_model | EventHandler<()> | — | The model line was pressed (to switch models). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace on the pill | Opens or closes the popover |
| ←or→ · HomeorEnd | On the slider: one level, or the ends |
| Escape | Closes the popover |
Accessibility
- The pill reports aria-expanded; the popover is a dialog named Thinking effort.
- The slider's value text is the level's name; reset is named after the level it returns to.
Responsive behaviour
- 380 px popover, capped at the viewport minus 32 px; the slider fills it.
Edge cases (spec)
380 px popover capped at the viewport minus 32 px.
Notes for AI
- Import
EffortPillfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
EffortPillElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.