Hover a number to identify the part
Menu Bar
/ NSApp.mainMenu · NSStatusBar.system /
also called menubar, system menu bar, top bar
The menu bar is the translucent strip across the top of the Mac screen. On the left are the system-owned Apple menu followed by the frontmost app’s main menu; the right side holds menu bar extras, followed by system status items and the clock. Every piece below has its own real name; hover a number to see exactly which part it names.
If you called it…
…you meant a menu bar.
Anatomy — every part, named
- 3Template icon
NSImage.isTemplateThe monochrome glyph that recolors itself for light/dark menu bars — a template image, usually an SF Symbol.
- 4Highlighted state
NSStatusBarButton.isHighlightedThe pale rounded pill behind the icon while its menu or popover is open — the hardest-to-describe pixel on this page.
- 7Separator item
NSMenuItem.separator()“The little line between options” is a separator item.
- 8Key equivalent
NSMenuItem.keyEquivalent“The ⌘Q text on the right side of a menu option” is the item's key equivalent.
Prompt — paste into your agent
Work on the macOS menu bar: the app's main menu (NSApp.mainMenu) sits on the left after the Apple menu; menu bar extras (NSStatusItem in NSStatusBar.system) sit on the right before the clock. Use the exact part names: status item, its highlighted state, NSMenu, NSMenuItem, separator item.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my macOS menu bar (NSMenu main menu, NSMenuItem). Rule out: items permanently greyed because their action has no target and nothing in the responder chain implements it; automatic enabling turned off (autoenablesItems) without manual validation; keyboard shortcuts defined but never firing because the item is disabled at validation time; the app menu title coming from the bundle display name, not from code. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| AppKit | NSApp.mainMenu | the app's menus on the left |
| AppKit | NSStatusBar.system | the icon area on the right |
| SwiftUI | MenuBarExtra | one right-side icon, macOS 13+ |