<!--
{
  "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/ToolbarItem",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11ToolbarItemV"
  },
  "title" : "ToolbarItem"
}
-->

# ToolbarItem

A model that represents an item which can be placed in the toolbar
or navigation bar.

```
nonisolated struct ToolbarItem<ID, Content> where Content : View
```

## Topics

### Creating a toolbar item

[`init(placement:content:)`](/documentation/SwiftUI/ToolbarItem/init(placement:content:))

Creates a toolbar item with the specified placement and content.

[`init(id:placement:content:)`](/documentation/SwiftUI/ToolbarItem/init(id:placement:content:))

Creates a toolbar item with the specified placement and content,
which allows for user customization.

[`init(id:placement:showsByDefault:content:)`](/documentation/SwiftUI/ToolbarItem/init(id:placement:showsByDefault:content:))

Creates a toolbar item with the specified placement and content,
which allows for user customization.



---

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)