Grid

The collection arranger — uniform tiles that wrap and reflow their column count with the container width, no breakpoints. A peer of Stack.

Each example measures itself, so its gutters are to scale rather than to the page's. The arrangements are exact.

Show guides
PropDescriptionDefaultControl
aselement to render. ul by default, wrapping each child in an li; ol when order matters; div when it is not a collectionuloldivul
  • ul
  • ol
  • div
minColumnWidththe narrowest a column may be; as many columns as fit, then wrap. Any CSS length; a bare number is px16rem
maxColumnsthe most columns allowed. Omit (0 here) for no limit. In code it can change by breakpoint: { base: 1, sm: 3 }0
gapspace between items, a spacing step00-250-51234684
  • 0
  • 0-25
  • 0-5
  • 1
  • 2
  • 3
  • 4
  • 6
  • 8
gapScalecomponent for a fixed gap, layout for one that grows with the Sectioncomponentlayoutcomponent
ratioa fixed aspect ratio for every cell, such as 16:9. Blank keeps each item's natural height
justifywhere each item sits across its cell. Default stretch fills the columnstretchstartcenterendstretch
  • stretch
  • start
  • center
  • end
alignwhere each item sits down its cell. Default stretch makes every item in a row the same heightstretchstartcenterendstretch
  • stretch
  • start
  • center
  • end
stretchwhen there are fewer items than columns, they widen to fill the row. Off leaves the spare columns emptytrue