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.
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.
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:) |