Interactive previews iPhone

ToolbarItem Shared Background Visibility

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

ToolbarItem Shared Background Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 26.0+ iPadOS 26.0+ macOS 26.0+

Tags

SwiftUI Code

Docs
NavigationStack {
  Text("Foo")
    .toolbar {
    ToolbarItem {
      Button("Account", systemImage: "person.circle", action: action)
    }
    ToolbarItem {
      Button("Account", systemImage: "person.circle", action: action)
    }
    .sharedBackgroundVisibility(.hidden)
  }
}

Found an issue or have a suggestion?

Created: June 10, 2025Updated: December 27, 2025
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

More Toolbars Components

View all
Prefer Vertical Toolbar Items - iOS on iPhone Duo - Landscape - Closed - Liquid Glass - Light Mode - Preview
modifier

Prefer Vertical Toolbar Items

A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.

Axis Behavior - iOS on iPhone Duo - Landscape - Closed - Liquid Glass - Light Mode - Preview
modifier

Axis Behavior

The bar axis behavior of the toolbar item.

Toolbar Item Visibility Priority - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Toolbar Item Visibility Priority

Defines the visibility priority for a toolbar item.

Toolbar Overflow Menu - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Toolbar Overflow Menu

The overflow menu of a toolbar. An overflow menu represents actions that are always placed in the toolbar’s overflow menu, regardless of the toolbar mode, platform, or customizability.

Pinned Toolbar Item Placement - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Pinned Toolbar Item Placement

A placement that pins the item to the trailing edge of the toolbar.

Remove Toolbar Item Margin - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Remove Toolbar Item Margin

Configures whether the content margins are removed.

Title Toolbar Item Placement - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializers

Title Toolbar Item Placement

Places content in the title area

ToolbarSpacer - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

ToolbarSpacer

A standard space item in toolbars

Explore Other Components

Browse all
Toolbar Vertical Edge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
environment

Toolbar Vertical Edge

This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.

Button Sizing - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Button Sizing

The preferred sizing behavior of buttons in the view hierarchy.

Disable Sheet Dismiss Swipe - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Disable Sheet Dismiss Swipe

Conditionally prevents interactive dismissal of presentations like popovers, sheets, and inspectors. Dragging the sheet is still possible to a limited extent, as shown in the screenshot, but it will never be dismissed.

Page Screen Sheet Size - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Page Screen Sheet Size

On devices smaller than a page of paper, such as iPhone, Apple Watch, and 8" or 11" iPads, the sheet fills the entire height and, unlike the default sheet on iPad, the full width. On macOS, .page behaves like .fitted.

Custom Header Subscription Store View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Header Subscription Store View

Creates a view that loads all the subscriptions in a subscription group from the App Store, and merchandises them with custom marketing content.

Multiple Sources Toggle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Multiple Sources Toggle

Creates a toggle that updates the selected property for all sources. Once toggled, all sources will have the same value.

ViewThatFits - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
initializer

ViewThatFits

A view that adapts to the available space by providing the first child view that fits.

Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Divider

A visual element that can be used to separate other content