iPhone Duo SwiftUI layouts

Explore interactive SwiftUI previews across every available orientation and hinge state.

Toolbars

Axis Behavior

The bar axis behavior of the toolbar item.

 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)
                }
}
iOS 27.1+ iPadOS 27.1+

Every available iPhone Duo screenshot for Axis Behavior.

6 views