Menu

The v-menu component shows a menu at the position of the element used to activate it.

Usage

Remember to put the element that activates the menu in the activator slot.

API

v-menu
Name
absolute
Default
false
Type
boolean

Position the element absolutely

Name
activator
Default
undefined
Type
any

Designate a custom activator when the activator slot is not used. String can be any valid querySelector and Object can be any valid Node

Name
allow-overflow
Default
false
Type
boolean

Removes overflow re-positioning for the content

Name
attach
Default
false
Type
any

Specifies which DOM element that this component should detach to. Use either a CSS selector string or an object reference to the element.

Name
auto
Default
false
Type
boolean

Centers list on selected element

Name
bottom
Default
false
Type
boolean

Align the component towards the bottom

Name
close-delay
Default
0
Type
number | string

Milliseconds to wait before closing component

Name
close-on-click
Default
true
Type
boolean

Designates if menu should close on outside-activator click

Name
close-on-content-click
Default
true
Type
boolean

Designates if menu should close when its content is clicked

Name
content-class
Default
undefined
Type
any

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.

Name
dark
Default
false
Type
boolean

Applies the dark theme variant

Name
disable-keys
Default
false
Type
boolean

Removes all keyboard interaction

Name
disabled
Default
false
Type
boolean

Disables the menu

Name
fixed
Default
false
Type
boolean

Position the element fixed

Name
full-width
Default
false
Type
boolean

Forces 100% width

Name
input-activator
Default
false
Type
boolean

Sets a new activator target for the detached element. Use when placing detachable items in v-input slots

Name
lazy
Default
false
Type
boolean

Conditionally renders content on mounted. Will only render content if activated

Name
left
Default
false
Type
boolean

Align the component towards the left

Name
light
Default
false
Type
boolean

Applies the light theme variant

Name
max-height
Default
auto
Type
any

Sets the maximum height for the content

Name
max-width
Default
auto
Type
number | string

Sets the maximum width for the content

Name
min-width
Default
undefined
Type
number | string

Sets the minimum width for the content

Name
nudge-bottom
Default
0
Type
number | string

Nudge the content to the bottom

Name
nudge-left
Default
0
Type
number | string

Nudge the content to the left

Name
nudge-right
Default
0
Type
number | string

Nudge the content to the right

Name
nudge-top
Default
0
Type
number | string

Nudge the content to the top

Name
nudge-width
Default
0
Type
number | string

Nudge the content width

Name
offset-overflow
Default
false
Type
boolean

Causes the component to flip to the opposite side when repositioned due to overflow

Name
offset-x
Default
false
Type
boolean

Offset the menu on the x-axis. Works in conjunction with direction left/right

Name
offset-y
Default
false
Type
boolean

Offset the menu on the y-axis. Works in conjunction with direction top/bottom

Name
open-delay
Default
0
Type
number | string

Milliseconds to wait before opening component

Name
open-on-click
Default
true
Type
boolean

Designates whether menu should open on activator click

Name
open-on-hover
Default
false
Type
boolean

Designates whether menu should open on activator hover

Name
origin
Default
'top left'
Type
string

Sets the transition origin

Name
position-x
Default
undefined
Type
number

Used to position the content when not using an activator slot

Name
position-y
Default
undefined
Type
number

Used to position the content when not using an activator slot

Name
return-value
Default
undefined
Type
any

Components.Menus.

Name
right
Default
false
Type
boolean

Align the component towards the right

Name
top
Default
false
Type
boolean

Align the content towards the top

Name
transition
Default
v-menu-transition
Type
boolean | string

Sets the component transition. Can be one of the built in transitions or your own.

Name
value
Default
undefined
Type
any

Controls visibility

Name
z-index
Default
undefined
Type
number | string

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.

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 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.

Edit this page | language on Github