# Sub Menu
The Sub Menu component is a list of items arranged in a vertical list used for navigation within tabs or other places. Each item can be clicked to navigate to another page, or execute a function.
# Items
Use the items
prop to build your menu as a SubMenuItem[]
. See the Interfaces section for a full list of options.
# Title
Use the title
prop to set sub menu title.
# Icons
Use the icon
property inside menu items to set icon for specific menu item.
# Variants
Use the variant
prop to change style of sub menu. By default normal
variant is set.
# Fullwidth
Use the fullwidth
prop to set sub menu to full width.
# Events
Event | Arguments | Description |
---|---|---|
@item:click | The SubMenuItem object of the clicked item | Emitted whenever a menu item is clicked |
# Interfaces
# SubMenuItem Interface
Each SubMenuItem can have the following properties. You cannot combine to
and onClick
and must choose only one for each item.
Property | Type | Description | Required |
---|---|---|---|
id | String | The unique id for the menu item | false |
text | String | The text for the menu item | true |
icon | String | The icon for the menu item | false |
to | Route|string | A route to navigate to when clicked. Cannot be combined with onCLick | false |
onClick | Function | The function to execute when clicked. Cannot be combined with to | false |
active | Boolean | Whether the item is active or not. By default if your app uses vue-router, this will be handled automatically | false |