Masonry

Masonry layout — native CSS masonry where supported, multi-column fallback elsewhere (fallback orders items top-to-bottom per column).

Category: layout · WCAG 2.1-AA · layout, masonry, gallery

Props

PropTypeDefaultDescription
colsnumber3Number of columns
gap1|2|3|4|5|6|8|10|124Spacing token step

Design tokens

When to use

When not to use

Examples

Masonry gallery

Variable-height cards laid out in a masonry pattern; falls back to CSS columns

<Masonry cols={3} gap={4}>{items.map(item => <Card key={item.id}>{item.content}</Card>)}</Masonry>

Related components

← Back to docs