Ballmac UI home

Menu Bar

A translucent macOS menu bar on Radix Menubar: a bold app menu, menus with key equivalents, submenus and checkmarks, a status area with icon buttons and a hydration-safe live clock.

Installation

$ pnpm dlx shadcn@latest add @ballmac/menu-bar

Usage

import { MenuBar, MenuBarCheckboxItem, MenuBarClock, MenuBarContent, MenuBarGroup, MenuBarItem, MenuBarLabel, MenuBarMenu, MenuBarSeparator, MenuBarShortcut, MenuBarStatus, MenuBarStatusItem, MenuBarSub, MenuBarSubContent, MenuBarSubTrigger, MenuBarTrigger } from "@/components/ballmac/menu-bar"

The full example is in the Code tab above.

API reference

<MenuBarTrigger>

PropTypeDefault
variant

"app" sets the trigger in bold, like the application menu next to the logo.

"default" | "app""default"

<MenuBarContent>

PropTypeDefault
portal

Render into a portal on document.body (default). Set false to keep the menu inside its container, e.g. in a mockup.

booleantrue

<MenuBarItem>

PropTypeDefault
inset

Indent the label to line up with checkbox items.

boolean—
variant

Red text for destructive actions.

"default" | "destructive""default"

<MenuBarSubContent>

PropTypeDefault
portal

Render into a portal on document.body (default).

booleantrue

<MenuBarClock>

PropTypeDefault
locale

BCP 47 locale for formatting. Fixed by default so server and browser agree.

string"en-US"
format

Intl options. Default: short weekday, month, day, and hour:minute.

Intl.DateTimeFormatOptionsdefaultClockFormat
value

Show a fixed time instead of the live clock (useful for mockups and screenshots).

Date—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
TabFocuses the menu bar (one stop), then the status buttons
ArrowLeft / ArrowRightMoves between menus, also while one is open
Enter / Space / ArrowDownOpens the focused menu
ArrowUp / ArrowDown, typeaheadMoves between items
EscapeCloses the menu and returns focus to its trigger

Use with AI

<MenuBar> holds <MenuBarMenu value><MenuBarTrigger/><MenuBarContent>items</MenuBarContent></MenuBarMenu> (Radix Menubar parts with Mac styling) followed by <MenuBarStatus> with <MenuBarStatusItem aria-label> icon buttons and <MenuBarClock />. Use variant="app" on the app-name trigger and <MenuBarShortcut> for key equivalents. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Menu Bar (@ballmac/menu-bar) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • A Mac desktop mockup or product hero where the app's menus should really open
  • A web app that wants desktop-style menus with keyboard navigation (File, Edit, View)
  • Status bars that pair a few icon buttons with a clock

Not for

  • Site navigation for a marketing page (use a header with links)
  • A single action menu on a button (use a dropdown menu)

Registry JSON: https://ui.ballmac.com/r/menu-bar.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils