Skip to content
Back

Model effort menuPro

Models listed with their effort as a suffix; hovering or → opens a cascading submenu that sets that model’s effort.

oxyn add model-effort-menu
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 a model and its effort in one gesture: every model shows its effort as a suffix, and its submenu changes it.

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

Model effort menu 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 model-effort-menu

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

Submenu

Each model shows its effort as a grey suffix; the chosen one's submenu is open with High checked.

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

List

Just the list: Nimbus 3 runs at Max, the suffix in 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

Closed

Closed: the chip names the chosen model.

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

ModelEffortMenu

PropTypeDefaultDescription
modelsOption<Vec<EffortModel>>Default::default()The models (seven fictional ones when `None`).
default_modelusize5Starting chosen model index.
default_openboolDefault::default()Starts open (for previews).
default_subOption<usize>Default::default()Starts with this row's submenu open (for previews).
on_changeEventHandler<(usize, usize)>—A model and level were picked: (model index, level index).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑or↓Moves between models, or between levels inside a submenu
→orEnterOpens the model's effort submenu
←orEscapeBack to the models; Escape again closes

Accessibility

  • Model rows are menuitems with aria-haspopup and aria-expanded; their name includes the effort (“Atlas 6, High”).
  • Levels are menuitemradio rows; picking one picks the model too and returns focus to the chip.

Responsive behaviour

  • 330 px list; the submenu cascades to the right, and under a 640 px viewport it opens in place under its row.
Edge cases (spec)

Under a 640 px viewport the submenu opens in place under its row instead of to the right.

Notes for AI

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