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

List Row Spacing

Sets the vertical spacing between two adjacent rows in a List.

Current Value Gauge  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Current Value Gauge

Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value

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

Semantic Colors

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

TabsPickerStyle

A picker style that presents options as segmented tabs. On macOS, this style produces a segmented picker with a visual treatment that distinguishes tab navigation from value selection. On iOS, tvOS, and visionOS, the visual appearance matches that of the standard standard .segmented style. On all supported platforms, VoiceOver announces options as tabs.

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

Divider

A visual element that can be used to separate other content

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

Gauge Colors - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Gauge Colors

Customizing the colors of different styles with minimal effort

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

Nested Menu

A Menu inside a Menu