Navigation
IMenubar
An application menubar — File, Edit, View. Once one menu is open, hovering another swaps to it without a second click.
Last action: —
When to reach for one
A menubar suits a document-like application with a large set of commands. For a handful of actions on a page, use an IToolbar or a single IDropdownMenu.
Menus and entries
Each menu takes the same entry shape as IDropdownMenu: separators, submenus, danger and icons all behave the same way.
A menu's value identifies it, and falls back to the label.
const menus = [
{ label: 'File', value: 'file', items: fileItems },
{ label: 'Edit', items: editItems }, // value is "Edit"
{ label: 'Tools', disabled: true, items: [] }, // present but not openable
]Controlling which menu is open
v-model holds the value of the open menu, or undefined when none is.
<IMenubar v-model="openMenu" :menus="menus" />Bare
Drops the container so the triggers sit directly on the page — for an app shell that already provides its own bar.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
menus | MenubarMenuOption[] | [] | |
modelValue | string | — | Value of the open menu; v-model |
bare | boolean | false | Drop the container |
loop | boolean | false | Wrap from the last menu back to the first |
align | 'start' | 'center' | 'end' | 'start' | How each panel aligns to its trigger |
sideOffset | number | 6 | Gap between panel and trigger |
unstyled | boolean | — | Skip built-in classes |
ui | { root?, trigger?, content?, item?, label?, separator?, subTrigger?, subContent? } | — | Per-slot class overrides |
MenubarMenuOption
| Field | Type | Description |
|---|---|---|
label | string | |
value | string | Defaults to the label |
disabled | boolean | |
items | DropdownMenuEntry[] | The menu's entries |
Slots
| Slot | Props | Description |
|---|---|---|
trigger | { menu } | Replaces a trigger's contents |
Accessibility
The bar is one Tab stop. Arrow keys move between menus, ↵ or ↓ opens one, and while a menu is open the left and right arrows move to its neighbours. Escape closes and returns focus to the trigger.