<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "tvOS: 18.4.0 -",
    "visionOS: 2.4.0 -",
    "watchOS: 11.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ContentToolbarPlacement",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI23ContentToolbarPlacementV"
  },
  "title" : "ContentToolbarPlacement"
}
-->

# ContentToolbarPlacement

A region of the interface that hosts its own toolbar content.

```
struct ContentToolbarPlacement
```

## Overview

Some containers draw a bar that belongs to the container as a whole rather
than to the view currently on screen, such as the sidebar of a [`TabView`](/documentation/SwiftUI/TabView)
that uses the [`sidebarAdaptable`](/documentation/SwiftUI/TabViewStyle/sidebarAdaptable) style. Pass a value of this
type to [`contentToolbar(for:content:)`](/documentation/SwiftUI/View/contentToolbar(for:content:)) to put items in one of those
bars.

The following example adds a button to the sidebar of a tab view, where it
stays put as someone moves between tabs:

```
TabView {
    Tab("Lights", systemImage: "lightbulb") {
        LightsView()
    }

    Tab("Locks", systemImage: "lock") {
        LocksView()
    }
}
.tabViewStyle(.sidebarAdaptable)
.contentToolbar(for: .tabViewSidebar) {
    ToolbarItem {
        DisconnectDevicesButton()
    }
}
```

Each placement accepts only some [`ToolbarItemPlacement`](/documentation/SwiftUI/ToolbarItemPlacement) values. Check the
documentation of the placement you use before you rely on a position.

## Topics

### Type Properties

[`static let tabViewSidebar: ContentToolbarPlacement`](/documentation/SwiftUI/ContentToolbarPlacement/tabViewSidebar)

The tab view sidebar. This is present on certain platforms
when using the `.sidebarAdaptable` tab view style.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)