---
title: principalItemIdentifier
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstouchbar/principalitemidentifier
---

# principalItemIdentifier

The identifier of an item you want the system to center in the Touch Bar.

## Declaration

```swift
var principalItemIdentifier: NSTouchBarItem.Identifier? { get set }
```

## Discussion

Discussion The system attempts to center a principal item within the Touch Bar. If you want a group of items to appear centered in the Touch Bar, designate the group item (of type NSGroupTouchBarItem) as the principal item. If more than one bar in the responder chain is eligible to be visible in the Touch Bar, and more than one of those has a principal item, the system determines which one to center in the Touch Bar. The system archives this property.

## See Also

### Providing bar items

- [delegate](appkit/nstouchbar/delegate.md)
- [templateItems](appkit/nstouchbar/templateitems.md)
- [defaultItemIdentifiers](appkit/nstouchbar/defaultitemidentifiers.md)
- [escapeKeyReplacementItemIdentifier](appkit/nstouchbar/escapekeyreplacementitemidentifier.md)
