Skip to content

Menubar

A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands.

Examples

Default

vue
<Menubar>
  <MenubarMenu>
    <MenubarTrigger>File</MenubarTrigger>
    <MenubarContent>
      <MenubarItem>
        New Tab <MenubarShortcut>⌘T</MenubarShortcut>
      </MenubarItem>
      <MenubarItem>
        New Window <MenubarShortcut>⌘N</MenubarShortcut>
      </MenubarItem>
      <MenubarItem disabled>New Incognito Window</MenubarItem>
      <MenubarSeparator />
      <MenubarSub>
        <MenubarSubTrigger>Share</MenubarSubTrigger>
        <MenubarSubContent>
          <MenubarItem>Email link</MenubarItem>
          <MenubarItem>Messages</MenubarItem>
          <MenubarItem>Notes</MenubarItem>
        </MenubarSubContent>
      </MenubarSub>
      <MenubarSeparator />
      <MenubarItem>
        Print... <MenubarShortcut>⌘P</MenubarShortcut>
      </MenubarItem>
    </MenubarContent>
  </MenubarMenu>
</Menubar>

Props

PropTypeDefaultDescription
defaultValuestring-The value of the menu item that should be active when initially rendered.
valuestring-The controlled value of the active menu item.
dirltr | rtl-The reading direction of the menubar.
loopbooleanfalseWhether the keyboard navigation should loop around.

Slots

SlotDescription
defaultThe content of the menubar.
SlotDescription
defaultThe content of the menu.
SlotDescription
defaultThe content of the trigger.
SlotDescription
defaultThe items of the menubar menu.
SlotDescription
defaultThe content of the menu item.