Axis Behavior

The bar axis behavior of the toolbar item.

Axis Behavior - Preview Not Available

Platform Compatibility

iOS 27.1+ iPadOS 27.1+

Tags

SwiftUI Code

Docs
 NavigationStack {
            Text("FooBar")
                .toolbar {
                    ToolbarItem {
                        Button(role: .confirm, action: action)
                    }
                    ToolbarItem {
                        Button(role: .cancel, action: action)
                    }
                    .axisBehavior(.horizontalOnly)
                    ToolbarItem {
                        Button("Foo", action: action)
                    }
                    ToolbarItem {
                        Button("Bar", action: action)
                    }
                    .axisBehavior(.verticalPreferred)
                }
}

Found an issue or have a suggestion?

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

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started