Title and toolbar items share one strip — the unified title bar (NSToolbar)
Toolbar (Unified Title Bar)
/ NSToolbar · NSToolbarItem /
also called window toolbar, unified toolbar, title bar toolbar
A toolbar holds the primary actions for a window and can share a single top row with the window title in the unified style. Its native toolbar items participate in macOS spacing, validation, customization, and overflow behavior. A title bar separator can appear between this chrome and the window's content, depending on the window style and scroll position.
If you called it…
…you meant a toolbar (unified title bar).
Anatomy — every part, named
- 1Toolbar item
NSToolbarItemOne button, search field, control group, or flexible space in the toolbar is a toolbar item.
- 2Toolbar item label
NSToolbarItem.labelThe text shown beneath an icon in icon-and-text mode is the item label; the customization palette can use a separate palette label.
- 3Overflow chevron
NSToolbarItem.visibilityPriorityThe trailing chevron that appears when items no longer fit opens the toolbar's overflow menu.
- 4Title-bar separator styles
NSWindow.titlebarSeparatorStyleThe boundary under the toolbar can be automatic, a visible line, a shadow, or absent through the title-bar separator style.
Prompt — paste into your agent
Create a Toolbar (Unified Title Bar) with NSToolbar and NSWindow.ToolbarStyle.unified (SwiftUI: View.toolbar), using native NSToolbarItem placement and spacing. Keep the title inline with the actions and let NSWindow.titlebarSeparatorStyle control the divider above the content.
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 toolbar (NSToolbar, NSToolbarItem). Rule out: items missing because they are absent from itemIdentifiers defaults vs alloweds; items greyed by validateToolbarItem returning false (or not implemented for custom views); user customization not persisting without autosavesConfiguration; unified title bar style shifting content layout under the toolbar. 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 | NSToolbar | |
| AppKit | NSToolbarItem | |
| AppKit | NSWindow.ToolbarStyle.unified | places the window title inline with toolbar items |
| AppKit | NSWindow.titlebarSeparatorStyle | |
| SwiftUI | View.toolbar(content:) |