Menu
A simple menu
Class props
Menu component
A simple menu
html
<o-menu></o-menu>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
accordion | If sub menu items are collapsible | boolean | - | true |
activable | If the menu items are clickable | boolean | - | true |
ariaRole | Role attribute to be passed to the list container for better accessibility. Use menu only in situations where your dropdown is related to a navigation menu. | string | list , menu , dialog | From config: menu: { |
icon | Icon to be shown | string | - | |
iconPack | Icon pack to use | string | mdi , fa , fas and any other custom icon pack | From config: menu: { |
iconSize | Icon size | string | small , medium , large | From config: menu: { |
label | Menu label | string | - | |
override | Override existing theme classes completely | boolean | - |
Slots
Name | Description | Bindings |
---|---|---|
label | Override icon and label | |
default | Place menu items here |
MenuItem component
A menu list item
html
<o-menu-item></o-menu-item>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
active | The active state of the menu item, use v-model:active to make it two-way binding. | boolean | - | false |
animation | Transition name to apply on menu list | string | - | From config: menu: { |
ariaRole | Role attribute to be passed to the list item for better accessibility. | string | listitem , menuitem | From config: menu: { |
disabled | Menu item will be disabled | boolean | - | false |
expanded | Menu item will be expanded | boolean | - | false |
icon | Icon to be shown | string | - | |
iconPack | Icon pack to use | string | mdi , fa , fas and any other custom icon pack | From config: menu: { |
iconSize | Icon size | string | small , medium , large | From config: menu: { |
label | Menu item label | string | - | |
override | Override existing theme classes completely | boolean | - | |
tag | Menu item tag name | DynamicComponent | - | From config: menu: { |
Events
Event name | Properties | Description |
---|---|---|
update:active | value boolean - updated active prop | active prop two-way binding |
update:expanded | value boolean - updated expanded prop | expanded prop two-way binding |
Slots
Name | Description | Bindings |
---|---|---|
label | Override label | expanded boolean - item expanded stateactive boolean - item active state |
default | Place menu items here |
Sass variables
Current theme ➜ Oruga Base
SASS Variable | Default |
---|---|
$menu-item-color | $grey-dark |
$menu-item-hover-color | $black |
$menu-item-hover-background-color | $grey-light |
$menu-item-active-color | $primary-invert |
$menu-item-active-background-color | $primary |
$menu-item-disabled-color | $grey-light |
$menu-list-border-left | 1px solid $primary |
$menu-list-line-height | 1.25em |
$menu-item-padding | 0.5em 0.75em |
$menu-nested-list-margin | 0.75em |
$menu-nested-list-padding-left | 0.75em |
$menu-label-color | $grey |
$menu-label-font-size | 0.75em |
$menu-label-spacing | 1em |
See ➜ 📄 Full scss file
Current theme ➜ Oruga Full
SASS Variable | Default |
---|---|
$menu-item-color | $grey-dark |
$menu-item-hover-color | $black |
$menu-item-hover-background-color | $grey-light |
$menu-item-active-color | $primary-invert |
$menu-item-active-background-color | $primary |
$menu-item-disabled-color | $grey-light |
$menu-list-border-left | 1px solid $primary |
$menu-list-line-height | 1.25em |
$menu-item-padding | 0.5em 0.75em |
$menu-nested-list-margin | 0.75em |
$menu-nested-list-padding-left | 0.75em |
$menu-label-color | $grey |
$menu-label-font-size | 0.75em |
$menu-label-spacing | 1em |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
The theme does not have any custom variables for this component.
Current theme ➜ Bootstrap
SASS Variable | Default |
---|---|
$menu-label-bg | transparent |
$menu-label-color | var(--#{$prefix}body-color) |
$menu-label-font-size | 0.75em |
$menu-list-line-height | 1.25em |
$menu-item-padding | 0.5em 0.75em |
$menu-item-bg | transparent |
$menu-item-color | var(--#{$prefix}body-color) |
$menu-item-active-bg | var(--#{$prefix}primary) |
$menu-item-active-color | var(--#{$prefix}white) |
$menu-item-disabled-bg | transparent |
$menu-item-disabled-color | var(--#{$prefix}secondary) |
$menu-icon-spacer | 0.5rem |
$menu-submenu-border-left | 1px solid #445e00 |
$menu-submenu-padding-left | 0.75em |
$menu-submenu-margin | 0.75em |
See ➜ 📄 Full scss file