Atomx Docs
Components

Menubar

A persistent horizontal menu common in desktop applications, with menus, items, separators, shortcuts, checkboxes, radio groups, and sub-menus — built on Radix UI's Menubar primitive.

Install

npx shadcn@latest add https://atomx.acau.net/r/menubar.json

Usage

Use Menubar for the always-visible top-of-app menu bar in desktop-style applications (File / Edit / View / Window) where multiple top-level menus need to coexist and stay anchored. Reach for Dropdown Menu instead when a single menu should open from one trigger button.

Render one MenubarMenu per top-level menu and place items inside MenubarContent. Use MenubarSeparator between groups, MenubarShortcut for keyboard hints, and MenubarSub + MenubarSubTrigger + MenubarSubContent for nested menus.

<Menubar>
  <MenubarMenu>
    <MenubarTrigger>File</MenubarTrigger>
    <MenubarContent>
      <MenubarItem>New Tab</MenubarItem>
      <MenubarSeparator />
      <MenubarItem variant="destructive">Quit</MenubarItem>
    </MenubarContent>
  </MenubarMenu>
</Menubar>

Preview

Props

ComponentNotable props
MenubarTriggerStandard button props.
MenubarContentalign (default "start"), alignOffset (default -4), sideOffset (default 8).
MenubarIteminset — left-indent to align with items that have icons. variant"default" or "destructive". onSelect, disabled.
MenubarLabelinset — matches MenubarItem indent.
MenubarCheckboxItemchecked, onCheckedChange.
MenubarRadioGroup / MenubarRadioItemvalue / onValueChange for mutually exclusive choices.
MenubarSub / MenubarSubTrigger / MenubarSubContentNested sub-menu.
MenubarSeparatorHorizontal divider.
MenubarShortcutRight-aligned keyboard hint span.