Menu de contexto aberto no ponteiro (clique direito), com um toque longo em telas sensíveis ao toque ou pelo teclado (Shift+F10 / tecla Menu); reutiliza o motor e os estilos de Menu, incluindo a animação data-motion="glide".
Agente de IA com o servidor MCP do Marvelous UI: install_components({ slugs: ["context-menu"], target_dir: "<absolute path>/src/marvelous", framework: "react" }).
Same option as mv-menu: the panel blooms from the click point, the highlight glides between items, submenus slide in.
Properties
Name
Tipo
Descrição
isOpen
boolean
Read-only.
menu
MenuPanel
Instance of the engine shared with mv-menu.
strings
Partial<Record<string, string>>
Overrides for the default text (en-US): menu (menu name when the target has no aria-label). App-wide translations: setStrings() from core/i18n.js, under the key "context-menu". Can be set before the element is defined.
Methods
Name
Descrição
openAt(x, y, { focus })
Opens at viewport coordinates; focus = "first" | "panel".
hide({ focus })
Closes; focus=true returns focus to the element that was active before opening (or to the area).
Target area; made focusable (tabindex=0) if it isn’t. Its aria-label names the menu.
[data-content]
Panel: same markup as mv-menu (menuitem, checkbox, radio, [data-submenu], <hr>, .mv-menu-label, .mv-menu-shortcut).
CSS classes
Name
Descrição
mv-context-menu-area
Ready-made dashed area (visual feedback during long-press).
CSS variables
Name
Descrição
--mv-menu-*
All Menu variables apply (width, highlight, background, radius).
Accessibility
role=menu panel (APG “Menu” pattern) with full navigation: ↑↓ Home/End, typeahead, → / ← for submenus, Escape and Tab close. Keyboard opening via Shift+F10 or the Menu key from the focusable area (focus on the first item); focus then returns to the original element.