Skip to content
Back

Context + Effort menuPro

One model chip whose dropdown sets both the context window (1M tagged “Higher usage”) and the effort, in two radio groups.

oxyn add context-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

  • Set the context window and the effort of the current model in one dropdown, from one chip in the composer.

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

Context + 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 context-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

Open

Two groups in one dropdown: the context window, where 1M carries a “Higher usage” tag, and the effort from default to max.

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

Big

1M window and max effort chosen; max is the one red word.

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 sums up both choices.

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

ContextEffortMenu

PropTypeDefaultDescription
modelString"Atlas 6 Swift"The model name on the trigger.
windowsOption<Vec<ContextOption>>Default::default()Context windows (512K and 1M when `None`).
levelsOption<Vec<EffortLevel>>Default::default()Effort scale (default, low … max when `None`).
default_windowusizeDefault::default()Starting window index.
default_effortusizeDefault::default()Starting effort index.
default_openboolDefault::default()Starts open (for previews).
on_window_changeEventHandler<usize>—The window changed.
on_effort_changeEventHandler<usize>—The effort changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑or↓ on the chipOpens the menu
↑or↓ · HomeorEndOne list across both groups (wraps)
EnterorSpacePicks; the menu stays open so both can be set
EscapeCloses back to the chip

Accessibility

  • Each group is role=group named by its heading; rows are menuitemradio with aria-checked.
  • The chip's name says the model and both choices, e.g. “Atlas 6 Swift, 512K · high”.

Responsive behaviour

  • 220 px menu; the chip ellipsises its summary when narrow.
Edge cases (spec)

220 px menu, capped at the viewport minus 32 px; the chip ellipsises its summary.

Notes for AI

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