Ballmac UI home

Menubar

A horizontal application menu bar with roving focus across menus, submenus, shortcuts, checkbox and radio items, built on Radix.

Installation

$ pnpm dlx shadcn@latest add @ballmac/menubar

Usage

import { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarItem, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarLabel, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubTrigger, MenubarSubContent } from "@/components/ballmac/menubar"

The full example is in the Code tab above.

Examples

Theme: system

API reference

<MenubarItem>

PropTypeDefault
inset

Indent the item so it lines up with items that show a check or icon.

boolean—
destructive

Style the item as a destructive action (delete, sign out).

boolean—

<MenubarLabel>

PropTypeDefault
inset

Indent the label to match inset items.

boolean—

<MenubarSubTrigger>

PropTypeDefault
inset

Indent the trigger to match inset items.

boolean—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
ArrowLeft / ArrowRightMoves focus between menu triggers
ArrowDown / Enter / SpaceOpens the focused menu
ArrowUp / ArrowDownMoves within a menu
EscapeCloses the menu and returns to the bar

Use with AI

A File / Edit / View style bar. Left and Right move between menus, Down opens one, and hovering across open menus switches them. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Menubar (@ballmac/menubar) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Editors, dashboards and tools with many commands
  • Desktop-style web apps

Not for

  • Website navigation with links; use navigation-menu
  • The macOS system menu bar mockup; use menu-bar

Registry JSON: https://ui.ballmac.com/r/menubar.json

Credits

Based on shadcn/ui Menubar, adapted by Ballmac. Free to use in personal and commercial projects.