Custom List Section Spacing

Sets the spacing between adjacent sections in a List to a custom value.

Custom List Section Spacing - iOS Light Mode Preview

Platform Compatibility

iOS 17.0+ iPadOS 17.0+ watchOS 10.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
List {
  Section("Header") {
    Text("Foo")
  }
  Section("Header") {
    Text("Bar")
  }
  .listSectionSpacing(42)
  Section("Header") {
    Text("Foo")
  }
}

Found an issue or have a suggestion?

Created: August 6, 2025Updated: August 6, 2025