---
title: "accessoryBar(id:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/toolbaritemplacement/accessorybar(id:)"
---

# accessoryBar(id:)

Creates a unique accessory bar placement.

## Declaration

```swift
@backDeployed(before: macOS 14.0)
static func accessoryBar<ID>(id: ID) -> ToolbarItemPlacement where ID : Hashable
```

## Parameters

- `id`: A unique identifier for this placement.

## Discussion

Discussion On macOS, items with an accessory bar placement are placed in a section below the title bar and toolbar area of the window. Each separate identifier will correspond to a separate accessory bar that is added to this area. extension ToolbarItemPlacement {     static let favoritesBar = accessoryBar(id: "com.example.favorites") } ... BrowserView()     .toolbar {         ToolbarItem(placement: .favoritesBar) {             FavoritesBar()         }     }

## See Also

### Getting explicit placement

- [topBarLeading](swiftui/toolbaritemplacement/topbarleading.md)
- [topBarTrailing](swiftui/toolbaritemplacement/topbartrailing.md)
- [topBarPinnedTrailing](swiftui/toolbaritemplacement/topbarpinnedtrailing.md)
- [bottomBar](swiftui/toolbaritemplacement/bottombar.md)
- [bottomOrnament](swiftui/toolbaritemplacement/bottomornament.md)
- [keyboard](swiftui/toolbaritemplacement/keyboard.md)
