0Pricing
Swift Academy · Lesson

LazyVGrid and LazyHGrid

Building responsive grid layouts with GridItem fixed, flexible and adaptive columns.

Welcome

`LazyVGrid` and `LazyHGrid` provide grid layouts with customisable column or row definitions using `GridItem`. They're perfect for galleries, catalogues, and card layouts.

GridItem Types

• `.fixed(size)` — fixed pixel size • `.flexible(min:max:)` — fills available space • `.adaptive(minimum:maximum:)` — as many columns as fit

All lessons in this course

  1. VStack, HStack and ZStack Fundamentals
  2. LazyVGrid and LazyHGrid
  3. Spacer, Padding and Frame Modifiers
  4. GeometryReader for Adaptive Layouts
← Back to Swift Academy