Skip to content
On this page

VMenu

Props

NameTypeDescription
anchorEnum:
string
HTMLElement
ID or direct reference to the component's anchor element.
aria-labelstring
placementEnum:
top
right
bottom
left
top-start
top-end
right-start
right-end
bottom-start
bottom-end
left-start
left-end
placement of the menu
triggerEnum:
auto
legacy
off
Controls how the menu opens and closes itself.
auto-dismissbooleanindicates whether the menu will automatically close when focus moves away from it.
position-strategyEnum:
absolute
fixed
The strategy-absolute attribute.
openbooleanindicates whether the menu is open

Events

NameEvent TypeDescription
openCustomEvent<undefined>Fired when the menu is opened
closeCustomEvent<undefined>Fired when the menu is closed

Slots

NameDescription
defaultDefault slot.
anchorUsed to set the anchor element for the menu.
headerUsed to add additional content to the top of the menu.
action-itemsUsed to add action items to the bottom of the menu.

Methods

NameTypeDescription
focus() => voidMoves focus into the menu. If there is a child with the autofocus attribute, it will be focused. Otherwise, the first focusable child will be focused.
collapseExpandedItem() => voidCollapses any expanded Menu Items.
openChanged(_: boolean,newValue: boolean) => void