Component - Grid layout (LazyVGrid, LazyHGrid)
This UI component shows how to arrange items in a grid using SwiftUI's LazyVGrid and LazyHGrid. It helps display many items efficiently in rows and columns that scroll vertically or horizontally.
This UI component shows how to arrange items in a grid using SwiftUI's LazyVGrid and LazyHGrid. It helps display many items efficiently in rows and columns that scroll vertically or horizontally.
VStack ├── Text (Title) ├── ScrollView (Vertical) │ └── LazyVGrid │ ├── ForEach (Grid Items) │ │ └── Rectangle (Grid Cell) ├── Divider ├── ScrollView (Horizontal) │ └── LazyHGrid │ ├── ForEach (Grid Items) │ │ └── Rectangle (Grid Cell)