Context Menu

Right-click context menu.

Context Menu

Default

Right-click or focus the trigger and press Shift + F10 / the context-menu key. Arrows and Home / End move focus, Enter / Space selects, Escape closes and restores focus, and Tab closes before continuing navigation. The shared floating layer shifts menus into the viewport and teleports them by default.

Use item children to define submenus. Hover, click or press Right to open; Left and Escape return to the parent. Up/Down skip disabled items, and only leaf selections emit select. Each level uses the shared Popper with viewport flipping.

Nested menus

Nest trigger regions to provide different menus at different levels. The nearest enabled Context Menu handles a right-click, the context-menu key or Shift + F10; enclosing menus do not open for the same event. Right-click the exposed part of an enclosing region to open its own menu. Only one Context Menu stays open per document: opening another menu closes the previous one, including menus in separate component trees.

Disable the inner menu below to let the middle menu handle that area. Focus a region with Tab to try the keyboard shortcuts. Menu actions update the selection shown below.

API

PROPS

Property
Type
Values
Description
default
Example
More
min-width
Number
Pixels
Set the minimum menu width, constrained to the viewport.
184
—
items
[]
ContextMenuItem[]
Menu item definitions.
[]
—
v-model
Boolean
true / false
Controls menu visibility.
false
—
disabled
Boolean
true / false
Disable the context trigger.
false
—

EVENTS

Event
Type
Description
default
Example
More
select
(item: ) => void
Emitted when an enabled item is selected.
—
—
open
(event: MouseEvent | KeyboardEvent) => void
Emitted with the event that opened the menu.
—
—
close
() => void
Emitted when the menu closes.
—
—

EXPOSES

Method
Type
Description
default
Example
More
show
(event: MouseEvent | KeyboardEvent, target?: HTMLElement) => Promise<boolean>
Open at the pointer or keyboard origin and resolve whether opening succeeded.
—
—
close
(restoreFocus?: boolean) => void
Close and restore the origin by default when focus remains inside the menu.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied