VMenu
Props
| Name | Type | Description |
|---|---|---|
| anchor | Enum: string HTMLElement | ID or direct reference to the component's anchor element. |
| auto-dismiss | boolean | indicates whether the menu will automatically close when focus moves away from it. |
| offset | number | Adds offset to the popup |
| open | boolean | indicates whether the menu is open |
| placement | Enum:toprightbottomlefttop-starttop-endright-startright-endbottom-startbottom-endleft-startleft-end | placement of the menu |
| position-strategy | Enum:absolutefixed | The strategy-absolute attribute. |
| trigger | Enum:autolegacyoff | Controls how the menu opens and closes itself. |
Events
| Name | Event Type | Description |
|---|---|---|
| blur | FocusEvent | Fires when the element loses focus. |
| click | MouseEvent | Fires 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. |
| close | CustomEvent<undefined> | Fired when the menu is closed |
| focus | FocusEvent | Fires when the element receives focus. |
| input | Event | Fires when the value of an element has been changed. |
| keydown | KeyboardEvent | Fires when a key is pressed. |
| keyup | KeyboardEvent | Fires when a key is released. |
| open | CustomEvent<undefined> | Fired when the menu is opened |
Slots
| Name | Description |
|---|---|
| action-items | Used to add action items to the bottom of the menu. |
| anchor | Used to set the anchor element for the menu. |
| default | Default slot. |
| header | Used to add additional content to the top of the menu. |
Methods
| Name | Type | Description |
|---|---|---|
| collapseExpandedItem | () => void | Collapses any expanded Menu Items. |
| focus | () => void | Moves 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. |
| openChanged | (_: boolean,newValue: boolean) => void |