Menu
A versatile menu for navigation.
Examples
Use as a component
Basic example
Disabled items
Open set to true
Trigger a function when the menu popup is closed
Ignore the internal logic with static property
Use as a composable
Component API
Menu
Prop | Description | Type | Default |
---|---|---|---|
component | If the value is false only children of the main component will be rendered | boolean | false |
isStatic | If true the components becomes a shell and ignores all the internal logic | boolean | false |
open | Whether or not the menu is open | boolean | false |
items | Menu items | { id: number | string, value: string }[] | [] |
disabledItems | Disabled menu items | number[] | string[] | [] |
onClose | Triggers when the dropdown menu is closed | function | () => {} |
onItemClick | Triggers when a menu item is clicked | function | (id: string | number) => {} |
onButtonClick | Triggers when the menu button is clicked | function | () => {} |
Menu Button
Prop | Description | Type | Default |
---|---|---|---|
onMenuButtonClick | Triggers when the button is clicked | function | () => {} |
Menu Dropdown
Prop | Description | Type | Default |
---|---|---|---|
open | Whether or not the dropdown is visible | boolean | false |
Menu Item
Prop | Description | Type | Default |
---|---|---|---|
item | Menu item | { id: number | string, value: string } | / (required) |
isDisabled | Whether the item is disabled | boolean | false |
onClick | Triggers when the item is clicked | function | (id: string | number) => {} |