---
title: "toolbarDefaultItemIdentifiers(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstoolbardelegate/toolbardefaultitemidentifiers(_:)"
---

# toolbarDefaultItemIdentifiers(_:)

Asks the delegate to provide the default items to display on the toolbar.

## Declaration

```swift
@MainActor optional func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier]
```

## Parameters

- `toolbar`: The toolbar whose default item identifiers are to be returned.

## Return Value

Return Value An array of toolbar item identifiers, each of which represents an item that appears in the default toolbar. Arrange the identifiers in the order you want them to appear in the toolbar, with the first item appearing on the toolbar’s leading edge.

## Discussion

Discussion The toolbar calls this method when user settings don’t contain any custom configuration data for the toolbar. The toolbar also calls it to initialize the customization palette’s contents. important: Even though this is an optional method, you must implement it if you create the toolbar programatically. If you configure your toolbar in Interface Builder, the configuration there provides the default items.

## See Also

### Configuring the behavior of items

- [toolbarAllowedItemIdentifiers(_:)](appkit/nstoolbardelegate/toolbaralloweditemidentifiers(_:).md)
- [toolbarImmovableItemIdentifiers(_:)](appkit/nstoolbardelegate/toolbarimmovableitemidentifiers(_:).md)
- [toolbarSelectableItemIdentifiers(_:)](appkit/nstoolbardelegate/toolbarselectableitemidentifiers(_:).md)
- [toolbar(_:itemIdentifier:canBeInsertedAt:)](appkit/nstoolbardelegate/toolbar(_:itemidentifier:canbeinsertedat:).md)
