iPhone SwiftUI layouts
Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.
201elements
List
List Section Margins
Set the section margins for the specific edges.
Explore List Section Margins on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
List {
Section("Header") {
Text("Foo")
}
.listSectionMargins(.horizontal, 0)
Section {
Text("Bar")
} header: {
Text("Header")
}
}Compatibility
iOS 26.0+ iPadOS 26.0+ visionOS 26.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for List Section Margins.