---
title: "hidden(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/customizabletoolbarcontent/hidden(_:)"
---

# hidden(_:)

Hides a toolbar item within its toolbar.

## Declaration

```swift
nonisolated func hidden(_ hidden: Bool = true) -> some CustomizableToolbarContent

```

## Parameters

- `hidden`: Whether the toolbar item is hidden.

## Discussion

Discussion Use this modifier to conditionally display a toolbar item in the toolbar. On macOS, hidden items will be displayed during user customization. The following example hides a downloads button when there are no downloads, but it is displayed during customization. struct ContentView {     @State private var showDownloads = false

var body: some View {         BrowserView()             .toolbar(id: "browserToolbar") {                 ToolbarItem(id: "downloads") {                     DownloadsButton()                 }                 .hidden(!showDownloads)             }     } }
