Components
BaseMenuButton
A button that opens a menu of options, with a chevron that follows the open state.
components/ui/BaseMenuButton.vue
View in the demo
Example
Pick an option to see its action run.
Options
Each option is a BaseMenuOption:
Field | Type | Description |
|---|---|---|
title | string | The label. |
icon | string | A Lucide icon before the label. |
action | () => void | Runs when the option is picked. |
route | string | Navigates instead of running an action. |
color | string | A theme colour, such as error for destructive options. |
disabled | boolean | Shows the option but blocks it. |
type | divider | subheader | Renders a separator or a small heading instead of an option. |
dotColor, imageUrl | string | A coloured dot or an image before the label. |
API
It also accepts every prop, slot and event of v-btn, which it passes through.
Props
Name | Type | Default | Description |
|---|---|---|---|
options | BaseMenuOption[] | — | The options of the menu. |
offset | BaseMenuOffset | — | Distance between the button and the menu, in pixels. |
Every other attribute, such as button-type, goes to the BaseButton, and its slots are passed through too.