Prodular UI

Menubar

A horizontal bar of menus, like a desktop app's File and Edit menus, for editors and tools with many commands.

npx prodular-ui add menubar

Document editor

Open one menu, then move across with the arrow keys or by hovering.

With icons

Anatomy

<Menubar>  <MenubarMenu>    <MenubarTrigger>File</MenubarTrigger>    <MenubarContent>      <MenubarItem>        New document        <MenubarShortcut>⌘N</MenubarShortcut>      </MenubarItem>    </MenubarContent>  </MenubarMenu></Menubar>

Guidance

Use it when

  • Use in document editors, design tools and admin consoles where people expect desktop style menus.
  • Keep top level labels to one word: File, Edit, View, Help.

Avoid

  • Website navigation. Use Navigation menu.
  • Fewer than three menus. Use one or two Dropdown menus instead.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Each MenubarMenu needs exactly one MenubarTrigger and one MenubarContent.
  • Items, shortcuts, separators, checkbox and radio items behave and look exactly like Dropdown menu. Follow the same rules.
  • Show the platform shortcut with MenubarShortcut. Use the symbols ⌘ ⇧ ⌥ on macOS.
  • Put MenubarLabel inside a MenubarGroup.
  • Use variant="inline" inside a toolbar or command bar instead of overriding the border, background and padding with className.

API

MenubarContent

PropTypeDefaultDescription
align"start" | "center" | "end""start"Alignment against the trigger.

MenubarItem

PropTypeDefaultDescription
variant"default" | "destructive""default"Same as DropdownMenuItem.

Menubar

PropTypeDefaultDescription
loopFocusbooleantrueArrow keys wrap from the last menu to the first.
variant"default" | "inline""default"inline drops the card surface, for a menubar inside a toolbar or command bar.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add menubar# or, with the registry in components.jsonnpx shadcn@latest add @prodular/menubar