Skip to content

VMenu

Props

NameTypeDescription
anchorEnum:
string
HTMLElement
ID or direct reference to the component's anchor element.
auto-dismissbooleanSets the Menu to close when focus is lost
offsetnumberAdds offset to the popup
openbooleanSets the open state of the Menu
placementEnum:
top
bottom
left
right
top-start
top-end
bottom-start
bottom-end
left-end
left-start
right-end
right-start
Sets the desired position of the Menu relative to it's anchor element
position-strategyEnum:
fixed
absolute
Sets the position strategy
triggerEnum:
off
auto
legacy
Sets trigger method of Menu

Events

NameEvent TypeDescription
blurFocusEventFires when the element loses focus.
clickMouseEventFires when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element.
closeCustomEvent<undefined>Fired when the menu is closed
focusFocusEventFires when the element receives focus.
inputEventFires when the value of an element has been changed.
keydownKeyboardEventFires when a key is pressed.
keyupKeyboardEventFires when a key is released.
openCustomEvent<undefined>Fired when the menu is opened

Slots

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

Methods

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