I’m trying to recreate a layout similar to the Apple Health app. Specifically, I want the first element in a scrollable view to span edge-to-edge, while the rest of the content should look like a default (.insetGrouped) SwiftUI List.
Is there a way to achieve this effect within a List — having the first row ignore horizontal insets — or is this typically done using a ScrollView + VStack with custom styling to mimic List behavior?
I’d prefer to avoid fully recreating list sections manually if there’s a cleaner way to do this using List.


headerorfooterof a listSection. See the second part of this answer for details. See also SwiftUI: How to create different background colors for List sections?