Menu
The v-menu
component shows a menu at the position of the element used to activate it.
API
Position the element absolutely
Designate a custom activator when the activator slot is not used. String can be any valid querySelector and Object can be any valid Node
Removes overflow re-positioning for the content
Specifies which DOM element that this component should detach to. Use either a CSS selector string or an object reference to the element.
Centers list on selected element
Align the component towards the bottom
Milliseconds to wait before closing component
Designates if menu should close on outside-activator click
Designates if menu should close when its content is clicked
Applies a custom class to the detached element. This is useful because the content is moved to the end of the app and is not targettable by classes passed directly on the component.
Applies the dark theme variant
Removes all keyboard interaction
Disables the menu
Position the element fixed
Forces 100% width
Sets a new activator target for the detached element. Use when placing detachable items in v-input
slots
Conditionally renders content on mounted. Will only render content if activated
Align the component towards the left
Applies the light theme variant
Sets the maximum height for the content
Sets the maximum width for the content
Sets the minimum width for the content
Nudge the content to the bottom
Nudge the content to the left
Nudge the content to the right
Nudge the content to the top
Nudge the content width
Causes the component to flip to the opposite side when repositioned due to overflow
Offset the menu on the x-axis. Works in conjunction with direction left/right
Offset the menu on the y-axis. Works in conjunction with direction top/bottom
Milliseconds to wait before opening component
Designates whether menu should open on activator click
Designates whether menu should open on activator hover
Sets the transition origin
Used to position the content when not using an activator slot
Used to position the content when not using an activator slot
Components.Menus.
Align the component towards the right
Align the content towards the top
Sets the component transition. Can be one of the built in transitions or your own.
Controls visibility
The z-index used for the component
Examples
Absolute position
Menus can also be placed absolutely on top of the activator element using the absolute
prop. Try clicking anywhere on the image.
Absolute position without activator
Menus can also be used without an activator by using absolute
together with the props position-x
and position-y
. Try right-clicking anywhere on the image.
Menu with activator and tooltip
With the new v-slot
syntax, nested activators such as those seen with a v-menu
and v-tooltip
attached to the same activator button, need a particular setup in order to function correctly. Note: this same syntax is used for other nested activators such as v-dialog
w/ v-tooltip
.
Hover
Menus can be accessed using hover instead of clicking with the open-on-hover
prop.
Menus
Menus can be placed within almost any component.
Custom transitions
Vuetify comes with 3 standard transitions, scale, slide-x and slide-y. You can also create your own and pass it as the transition argument. For an example of how the stock transitions are constructed, visit here.
Popover menu
A menu can be configured to be static when opened, allowing it to function as a popover. This can be useful when there are multiple interactive items within the menu contents.