Documentation Index
Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
Use this file to discover all available pages before exploring further.
ScrollView is the generic scrollable container — wrap any content that may exceed the available space, on either axis. List is the iOS-native scrollable list with row chrome, separators, and optional selection tracking. ForEach iterates over data to produce one child per item, and is what you typically pair with the lazy stacks inside a ScrollView or with sections inside a List.
ScrollView
A scrollable container for content that may exceed the available space.The scrollable content. Typically a stack or lazy stack containing the scroll content.
Configuration options for the scroll view.
List
A scrollable list with optional selection tracking.Configuration options for selection tracking.
List provides built-in scrolling — you don’t 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. Customize with .listStyle(), .listRowBackground(), and .listRowSeparator(). For a non-list scrollable layout, use ScrollView with LazyVStack.ForEach
Iterates over data to produce components, creating one child per item.An array of items to iterate over. Each item is passed to the content function.
A function that returns a component for each item. Receives the item and its index.
Subviews overload: a component whose children are decomposed into individual subviews for rearranging or inspection.
Subviews overload: a function that receives each subview and returns a component.
Each call to the
content function should return exactly one component. Use Group to return multiple components as one. The index parameter is zero-based. The subviews overload enables view decomposition patterns, letting you restructure existing component trees without rebuilding them.See also
- LazyVStack — lazy vertical stack for long scrollable lists
- LazyHStack — lazy horizontal stack for carousels
- Section — grouping with headers and footers in a List
- Group — return multiple components as one
- Axis — scroll direction values