<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ToolbarContent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI14ToolbarContentP"
  },
  "title" : "ToolbarContent"
}
-->

# ToolbarContent

Conforming types represent items that can be placed in various locations
in a toolbar.

```
@MainActor @preconcurrency protocol ToolbarContent
```

## Overview

A type conforming to this protocol inherits `@preconcurrency @MainActor`
isolation from the protocol if the conformance is included in the type’s
base declaration:

```
struct MyCustomType: Transition {
    // `@preconcurrency @MainActor` isolation by default
}
```

Isolation to the main actor is the default, but it’s not required. Declare
the conformance in an extension to opt out of main actor isolation:

```
extension MyCustomType: Transition {
    // `nonisolated` by default
}
```

## Topics

### Implementing toolbar content

[`body`](/documentation/SwiftUI/ToolbarContent/body-swift.property)

The composition of content that comprise the toolbar content.

[`Body`](/documentation/SwiftUI/ToolbarContent/Body-swift.associatedtype)

The type of content representing the body of this toolbar content.

### Setting visibility

[`visibilityPriority(_:)`](/documentation/SwiftUI/ToolbarContent/visibilityPriority(_:))

Defines the visibility priority for a toolbar item.

## Relationships

### Conforming Types

[`ToolbarOverflowMenu`](/documentation/SwiftUI/ToolbarOverflowMenu)

[`DefaultToolbarItem`](/documentation/SwiftUI/DefaultToolbarItem)

[`ToolbarTitleMenu`](/documentation/SwiftUI/ToolbarTitleMenu)

[`TupleContent`](/documentation/SwiftUI/TupleContent)

[`ToolbarSpacer`](/documentation/SwiftUI/ToolbarSpacer)

[`ToolbarItem`](/documentation/SwiftUI/ToolbarItem)

[`ToolbarItemGroup`](/documentation/SwiftUI/ToolbarItemGroup)

[`EmptyView`](/documentation/SwiftUI/EmptyView)

[`Group`](/documentation/SwiftUI/Group)

[`ForEach`](/documentation/SwiftUI/ForEach)

### Inherited By

[`CustomizableToolbarContent`](/documentation/SwiftUI/CustomizableToolbarContent)

---

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)