SwiftUI Grid Generator
Generate `LazyVGrid` layouts with fixed or adaptive columns and spacing.
Perfect for galleries, product grids, dashboards, and card lists.
How to use
- Choose fixed or adaptive LazyVGrid columns.
- Set spacing and minimum column width.
- Copy the grid layout code.
- Drop into your ForEach-driven lists.
Advertisement
Responsive
in-content · Ad slot ready
Examples (copy-paste)
Adaptive columns
let columns = [GridItem(.adaptive(minimum: 120), spacing: 12)]
LazyVGrid(columns: columns, spacing: 12) {
ForEach(items) { item in
Cell(item: item)
}
}FAQs
- LazyVGrid vs Grid?
- Output uses LazyVGrid for scrollable content; use Grid for iOS 16+ static layouts if preferred.