Interactive previews iPhone Duo

Prefer Vertical Toolbar Items

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

Prefer Vertical Toolbar Items - Preview Not Available

Platform Compatibility

iOS 27.1+ iPadOS 27.1+

Tags

SwiftUI Code

Docs
TabView {
    Tab("A", systemImage: "a.square") {
        NavigationStack {
            Text("FooBar")
                .toolbar {
                    ToolbarItem {
                        Button("1", systemImage: "1.circle", action: action)
                    }
                    ToolbarItem {
                        Button("2", systemImage: "2.circle", action: action)
                    }
                    ToolbarItem {
                        Button("3", systemImage: "3.circle", action: action)
                    }
                    ToolbarItem {
                        Button("4", systemImage: "4.circle", action: action)
                    }
                    ToolbarItem {
                        Button("5", systemImage: "5.circle", action: action)
                    }
                }
                .toolbarVerticalCompressionBehavior(.prefersToolbarItems)
            }
        }
    Tab("B", systemImage: "b.square") {}
    Tab("C", systemImage: "c.square") {}
    Tab("D", systemImage: "d.square") {}
    Tab("E", systemImage: "e.square") {}
    Tab("F", systemImage: "f.square") {}
}

Found an issue or have a suggestion?

Created: September 26, 2026Updated: September 26, 2026
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

More Toolbars Components

View all
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

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
Tab View Side Bar Header - iPadOS - Landscape - Liquid Glass - Light Mode - Preview
modifier

Tab View Side Bar Header

Adds a custom header to the sidebar of a tab view.

List Row Insets - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Row Insets

Applies an inset to the rows in a list.

CarouselListStyle - watchOS - Flat Design - Light Mode - Preview
style

CarouselListStyle

The carousel list style.

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.

Custom Placeholder Async URL Image - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Placeholder Async URL Image

Loads and displays a modifiable image from the specified URL load request using a custom placeholder until the image loads.

Swipe Action - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Swipe Action

Adds custom swipe actions to a row in a list.

Boolean Sheet - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Boolean Sheet

Presents a sheet when a binding to a Boolean value that you provide is true. On watchOS, sheets are displayed as fullScreenCover.

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

AccessoryCircularGaugeStyle

A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value