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: November 16, 2026

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
List Badge - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Badge

Generates a badge for the view from an integer value.

RadioGroupPickerStyle - macOS - Liquid Glass - Light Mode - Preview
style

RadioGroupPickerStyle

A picker style that presents the options as a group of radio buttons.

Custom List Section Spacing - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Custom List Section Spacing

Sets the spacing between adjacent sections in a List to a custom value.

Divider Height - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Divider Height

Customizing the height of the Divider

ButtonToggleStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

ButtonToggleStyle

A toggle style that displays as a button with its label as the title.

Stepped Min Max Label Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Stepped Min Max Label Slider

Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels

Menu Section - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Menu Section

A Section inside a Menu

Standard Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Standard Colors

The SwiftUI standard colors