Sections & List Styles
Group rows with sections and pick a list style.
Grouping with Sections
A long list reads better when split into chunks. Section groups related rows under a shared heading. 🗂️
List {
Section("Fruits") {
Text("Apple")
}
}Headers and Footers
A Section can show a header above its rows and a footer below, great for titles and helper text.
Section {
Text("Wi-Fi")
} header: {
Text("Network")
} footer: {
Text("Tap to connect")
}All lessons in this course
- Building a Static List
- Looping with ForEach
- Identifiable & Stable IDs
- Sections & List Styles