Menu Bar

The macOS menu bar: the app menus on the left and status items with the clock on the right.

@cupertinoui/menubarBase UI Menubar Registry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/menubar

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import {
  Menubar,
  MenubarContent,
  MenubarExtra,
  MenubarExtras,
  MenubarItem,
  MenubarMenu,
  MenubarTrigger,
} from "@/components/ui/menubar"

<Menubar>
  <MenubarMenu>
    <MenubarTrigger app>Notes</MenubarTrigger>
    <MenubarContent>
      <MenubarItem>About Notes</MenubarItem>
    </MenubarContent>
  </MenubarMenu>
  <MenubarExtras>
    <MenubarExtra>Mon 9:41</MenubarExtra>
  </MenubarExtras>
</Menubar>
The menu bar is transparent and its text is white, as it sits over the wallpaper. Put it on a dark or colorful background.

API Reference

Every part forwards the props of the underlying Base UI Menubar part. The props below are the ones CupertinoUI adds or changes.

Menubar

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

MenubarTrigger

PropTypeDescription
appbooleanRender the bold application name.
classNamestringExtra classes, merged with the component's own.

MenubarExtras

Pushes status items and the clock to the right.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

MenubarExtra

A status item button.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.