iPad SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPad previews, Swift code, and Apple documentation.

TabView {
    TabSection("Foo") {
        Tab {
            Text("0")
        } label: {
            Text("1")
        }
    }

    TabSection("Bar") {
        Tab {
            Text("2")
        } label: {
            Text("3")
        }
    }
    .defaultSectionExpansion(.collapsed)

    TabSection("FooBar") {
        Tab {
            Text("4")
        } label: {
            Text("5")
        }
    }
}
.tabViewStyle(.sidebarAdaptable)
iOS 27.0+ iPadOS 27.0+ visionOS 27.0+

Every available iPad screenshot for Default Collapsed Tab Section.

1 views