Configuration options for selection tracking.
Support
Usage
Basic list
With ForEach
With sections
With selection tracking
Notes
- List provides built-in scrolling. You do not need to wrap it in a ScrollView.
- For selection tracking, each row should have a
.tag()modifier so the list can identify which item is selected. - For custom list styling, use the
.listStyle()modifier. For row-level customization, use.listRowBackground()and.listRowSeparator(). - For a non-list scrollable layout, use ScrollView with LazyVStack.
See Also
- Section — grouping with headers and footers
- ForEach — iterating over data
- ScrollView — generic scrollable container