Interactive previews iPhone

Toolbar Item Visibility Priority

Defines the visibility priority for a toolbar item.

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

Platform Compatibility

iOS 27.0+ iPadOS 27.0+ macOS 26.1+ watchOS 27.0+ tvOS 27.0+ visionOS 27.0+

Tags

SwiftUI Code

Docs
NavigationStack {
    Text("FooBar")
        .toolbar {
            ToolbarItem {
                Button("1", action: action)
            }
            .visibilityPriority(.init(lowerThan: .low))

            ToolbarItem {
                Button("2", action: action)
            }
            .visibilityPriority(.low)

            ToolbarItem {
                Button("3", action: action)
            }
            .visibilityPriority(.init(higherThan: .low))

            ToolbarItem {
                Button("4", action: action)
            }
            .visibilityPriority(.automatic)

            ToolbarItem {
                Button("5", action: action)
            }
            .visibilityPriority(.init(lowerThan: .high))

            ToolbarItem {
                Button("6", action: action)
            }
            .visibilityPriority(.high)

            ToolbarItem {
                Button("7", action: action)
            }
            .visibilityPriority(.init(higherThan: .high))

            ToolbarItem {
                Button("8", action: action)
            }
            .visibilityPriority(.init(higherThan: .init(higherThan: .high)))
        }
}

Found an issue or have a suggestion?

Created: August 30, 2026Updated: November 20, 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 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

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

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

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

ToolbarSpacer

A standard space item in toolbars

Explore Other Components

Browse all
Sheet Drag Indicator Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Sheet Drag Indicator Visibility

Sets the visibility of the drag indicator on top of a sheet.

Glass Button Styles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Glass Button Styles

A button style that applies glass border artwork based on the button’s context

Role Button With Default Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Role Button With Default Label

Creates a button that displays a default label.

Horizontal Radio Group Layout - macOS - Liquid Glass - Light Mode - Preview
modifier

Horizontal Radio Group Layout

Sets the style for radio group style pickers within this view to be horizontally positioned with the radio buttons inside the layout.

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

CheckboxToggleStyle

A toggle style that displays a checkbox followed by its label.

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

MenuControlGroupStyle

A control group style that presents its content as a menu when the user presses the control, or as a submenu when nested within a larger menu

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

ShareLink

A view that controls a sharing presentation

Button Styles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Button Styles

A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy