Founding sponsorYour name here
Notes

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…

the row of buttons across the top of a mac windowtitle bar with search and action icons in itmac window header where the toolbar and title share one rowtop strip with customizable window actionsline separating the toolbar from the window content

…you meant a toolbar (unified title bar).

Anatomy — every part, named

  1. 1
    Toolbar itemNSToolbarItem

    One button, search field, control group, or flexible space in the toolbar is a toolbar item.

  2. 2
    Toolbar item labelNSToolbarItem.label

    The text shown beneath an icon in icon-and-text mode is the item label; the customization palette can use a separate palette label.

  3. 3
    Overflow chevronNSToolbarItem.visibilityPriority

    The trailing chevron that appears when items no longer fit opens the toolbar's overflow menu.

  4. 4
    Title-bar separator stylesNSWindow.titlebarSeparatorStyle

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

AppKitNSToolbar
AppKitNSToolbarItem
AppKitNSWindow.ToolbarStyle.unifiedplaces the window title inline with toolbar items
AppKitNSWindow.titlebarSeparatorStyle
SwiftUIView.toolbar(content:)

See also

Search

Describe the UI element you're thinking of