---
title: "sharedBackgroundVisibility(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/toolbarcontent/sharedbackgroundvisibility(_:)"
---

# sharedBackgroundVisibility(_:)

Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping.

## Declaration

```swift
nonisolated func sharedBackgroundVisibility(_ visibility: Visibility) -> some ToolbarContent

```

## Parameters

- `visibility`: The visibility of the background effect.

## Discussion

Discussion This modifier adjusts the visibility of that effect. Hiding the effect will cause the item to be placed in its own grouping. ContentView()     .toolbar {         ToolbarItem(placement: principal) {             BuildStatus()         }         .sharedBackgroundVisibility(.hidden)     }
