Menu
A simple vertical menu
<template>
<b-menu>
<b-menu-list label="Menu">
<b-menu-item icon="information-outline" label="Info"></b-menu-item>
<b-menu-item icon="settings" :active="isActive" expanded>
<template #label="props">
Administrator
<b-icon class="is-pulled-right" :icon="props.expanded ? 'menu-up' : 'menu-down'"></b-icon>
</template>
<b-menu-item icon="account" label="Users"></b-menu-item>
<b-menu-item icon="cellphone-link">
<template #label>
Devices
<b-dropdown aria-role="list" class="is-pulled-right" position="is-bottom-left">
<template #trigger>
<b-icon icon="dots-vertical"></b-icon>
</template>
<b-dropdown-item aria-role="listitem">Action</b-dropdown-item>
<b-dropdown-item aria-role="listitem">Another action</b-dropdown-item>
<b-dropdown-item aria-role="listitem">Something else</b-dropdown-item>
</b-dropdown>
</template>
</b-menu-item>
<b-menu-item icon="cash-multiple" label="Payments" disabled></b-menu-item>
</b-menu-item>
<b-menu-item icon="account" label="My Account">
<b-menu-item label="Account data"></b-menu-item>
<b-menu-item label="Addresses"></b-menu-item>
</b-menu-item>
</b-menu-list>
<b-menu-list>
<b-menu-item label="Expo" icon="link" tag="router-link" target="_blank" to="/expo"></b-menu-item>
</b-menu-list>
<b-menu-list label="Actions">
<b-menu-item label="Logout"></b-menu-item>
</b-menu-list>
</b-menu>
</template>
<script>
export default {
data() {
return {
isActive: true
}
}
}
</script>
# API
Menu
Name | Description | Type | Values | Default |
---|---|---|---|---|
accordion | Close automatically the previous selected menu list | Boolean | — | true |
activable | Active automatically the clicked menu item | Boolean | — | true |
List
Name | Description | Type | Values | Default |
---|---|---|---|---|
label | Menu list label | String | — | — |
icon | Icon name | String | — | — |
icon-pack | Icon pack to use | String | — | mdi |
aria-role | Role attribute to be passed to list container for better accessibility. Use menu only in situations where your dropdown is really related to navigation. | String | menu | — |
Item
Name | Description | Type | Values | Default |
---|---|---|---|---|
label | Menu item label | String | — | — |
icon | Icon name | String | — | — |
icon-pack | Icon pack to use | String | — | mdi |
disabled | Item is disabled | Boolean | - | false |
active | Item is active, use the .sync modifier to make it two-way binding | Boolean | - | false |
expanded | Item is expanded when default contains menu items, use the .sync modifier to make it two-way binding | Boolean | - | false |
animation | Custom animation (transition name) | String | — | fade |
tag | Button tag name | String | a , router-link , nuxt-link or other nuxt alias | a |
aria-role | Role attribute to be passed to list item for better accessibility. Use menuitem only in situations where your menu item is really related to navigation. | String | menuitem | — |
Any native attribute | — | — | — | — |
# Variables
You can use these variables to customize this component.
Name | Default |
---|---|
Bulma variables | Link |
This page is open source. Noticed a typo or something's unclear?