Menu
Menubar
The application menu bar, with nested menus, that becomes a single menu button on narrow screens.
WAI-ARIA tested
Import
main.ts
import { Menubar } from '@vitral/vue';Basic
Last command: —
Small screens
A breakpoint wider than any screen keeps this one in its small-screen form.
API
Read from packages/vue/src/components/Menubar/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| model | MenuItem[] | The top-level items; their `items` drop down as menus, which may nest further. |
| breakpoint | string | Below this width the bar becomes a menu button with the items in a column. Defaults to `'960px'`. |
| ariaLabel | string | Names the menubar. |
| ariaLabelledby | string | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| mobile-toggle | open: boolean | The small-screen menu was opened or closed. |
Slots
| Name | Slot props | Description |
|---|---|---|
| start | — | Before the items: a logo. |
| end | — | After the items: a search box, an avatar. |
| item | (props: NestedMenuItemSlotProps) | — |
| buttonicon | — | The small-screen menu button's icon. |