The menu loops on its own. Hover a row for its bars, flip extended thinking for the effort row, or pick a model.
A model menu for a chat composer: rows with speed, quality and cost bars on hover, an extended-thinking switch that unfolds effort, and a tray rolling the first-token time and price.
The demo loops on its own: it opens, points at models so their bars fill, turns on extended thinking to unfold the effort picker, then picks one. You can drive it too: hover a row for its bars, ↑↓ and ↵ to pick, Esc or click away to close.
Options for the assembled component.
models*MenuModel[]Rows: id, name, tagline, optional glyph; optional stats (speed/quality/cost 0–5, price, ttfb per effort). Stats-less rows show 'Varies'.
value / open / thinking / effort / web (+ defaults)string / boolean / boolean / MenuEffort / booleanEach is controlled or starts from its default prop; matching onChange callbacks fire for each.
active / pointingstringnull / booleanPointer-highlight state; control both to script hovers (onActiveChange / onPointingChange).
side / align"top""bottom" / "start""end"Popover placement around the trigger.
labelsPartial<MmLabels>Overrides for every string the menu renders.
classNamestringExtra class on the root.
_model-menu/model-menu.tsxTrigger with name swap and thinking flag, the dialog card: listbox rows with 5-seg meters, switches, the fold with the effort radiogroup and sliding thumb, and the rolling caption.
_model-menu/menu-model.tsLit-model stats, aria labels, spoken captions and list/effort movement math.
_model-menu/types.tsMenuEffort, ModelStats, MenuModel and the label table.
_model-menu/use-model-menu-script.tsPlays the demo loop through the component's controlled props; user input dispatches into the same reducer.
_model-menu/model-menu.cssAll colors and spacing as tokens on .mm, with a dark theme, container query and reduced-motion handling.
Recreated from the behavior of a reference model menu. Colors and spacing are the reference values.
The menu loops on its own. Hover a row for its bars, flip extended thinking for the effort row, or pick a model.