Full-featured dropdown menu: checkboxes, radio items, submenus with a safe-triangle, shortcuts, typeahead and APG keyboard navigation; opt-in data-motion="glide" (opens from the trigger’s corner, a single highlight that glides between items, submenus that slide in).
Panel position relative to the trigger (automatic flip/shift).
offset
number
6
Distance from the trigger (px).
open
boolean
Opens/closes programmatically (reflects the state).
data-motion
"glide"
Opt-in (on mv-menu, mv-context-menu or an ancestor): the panel blooms from the corner closest to the trigger (based on data-side / data-align), a single highlight pill glides from item to item (hover and keyboard) instead of per-item backgrounds, and submenus slide out from their row. Without the attribute, rendering is unchanged.
Properties
Name
Type
Description
isOpen
boolean
Read-only.
menu
MenuPanel
Reusable engine (class exported by menu.js, used by Context Menu).
Methods
Name
Description
show({ focus })
Opens; focus = "first" | "last" | "panel".
hide({ focus })
Closes every level; focus=true returns focus to the trigger.
Events
Name
Description
mv-select
Cancelable (preventDefault keeps the menu open). detail: { value, label, item, checked?, group? }.
mv-open
After opening.
mv-close
After closing.
Content structure
Name
Description
first child
Trigger: aria-haspopup=menu, aria-expanded and aria-controls are set automatically.
[data-content]
Menu panel (role=menu).
<button role=menuitem>
Action item; value (or data-value) → detail.value; disabled or aria-disabled; data-variant="destructive".
role=menuitemcheckbox / menuitemradio
Checkable items (aria-checked). Radios are exclusive within their [role=group] (data-name → detail.group).
[data-keep-open]
On an item: keeps the menu open after selection.
[data-submenu]
Wraps a menuitem trigger + a nested [data-content]: submenu (hover, → / ←).
<hr>
Separator.
CSS classes
Name
Description
mv-menu-label
Group label; data-inset aligns it with checkable items.
mv-menu-shortcut
Right-aligned shortcut hint (ignored by typeahead).
mv-menu-header
Free-form header block (avatar + name…).
mv-menu-pill
Highlight pill created by the engine in glide mode (aria-hidden); tinted red on a destructive item. Uses --mv-menu-highlight.
CSS variables
Name
Default
Description
--mv-menu-width
auto
Fixed panel width.
--mv-menu-min-width
11rem
Minimum width.
--mv-menu-item-height
2rem
Minimum item height.
--mv-menu-highlight
Active item background.
--mv-menu-bg
Panel background.
--mv-menu-radius
Panel corner radius.
Accessibility
APG “Menu Button” and “Menu” patterns: Enter/Space/↓ open on the first item, ↑ on the last; ↑↓ Home/End navigate (roving focus, wrapping), letters trigger typeahead (accent-insensitive), → opens a submenu and ← closes it, Escape closes and returns focus to the trigger, Tab closes and continues tabbing. aria-checked on checkable items, aria-expanded on submenu triggers. Hover moves focus (like Radix).