VMenu
Props
Name | Type | Description |
---|---|---|
anchor | Enum: string HTMLElement | ID or direct reference to the component's anchor element. |
aria-current | Enum:page step location date time true false | Indicates the element that represents the current item within a container or set of related elements. |
aria-label | string | |
placement | Enum:top right bottom left top-start top-end right-start right-end bottom-start bottom-end left-start left-end | placement of the menu |
trigger | Enum:auto legacy off | Controls how the menu opens and closes itself. |
auto-dismiss | boolean | indicates whether the menu will automatically close when focus moves away from it. |
open | boolean | indicates whether the menu is open |
Events
Name | Event Type | Description |
---|---|---|
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. |
focus | FocusEvent | Fires when the element receives focus. |
blur | FocusEvent | Fires when the element loses focus. |
keydown | KeyboardEvent | Fires when a key is pressed. |
keyup | KeyboardEvent | Fires when a key is released. |
input | Event | Fires when the value of an element has been changed. |
open | CustomEvent<undefined> | Fired when the menu is opened |
close | CustomEvent<undefined> | Fired when the menu is closed |
Slots
Name | Description |
---|---|
default | Default slot. |
anchor | Used to set the anchor element for the menu. |
header | Used to add additional content to the top of the menu. |
action-items | Used to add action items to the bottom of the menu. |
Methods
Name | Type | Description |
---|---|---|
focus | () => void | Focuses the first item in the menu. |
collapseExpandedItem | () => void | Collapses any expanded menu items. |
openChanged | (_: boolean,newValue: boolean) => void |