MediaMasonry

Masonry gallery section — native CSS masonry where supported, multi-column fallback elsewhere (fallback orders tiles top-to-bottom per column). Tiles style themselves; section provides only the layout shell.

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

Props

PropTypeDefaultDescription
childrenReactNodeTile elements (images, cards, quotes) — consumer-provided and self-styled
titleReactNodeSection heading above the gallery
descriptionReactNodeSubheading below the section title
headingLevel1 | 2 | 32HTML heading level for the section title
colsnumber3Number of masonry columns
gap1|2|3|4|5|6|8|10|124Gap between tiles (spacing token step)

Design tokens

When to use

When not to use

Examples

Media gallery

Masonry gallery with three image tiles; falls back to CSS columns in unsupported browsers

<MediaMasonry title="Customer stories" cols={3} gap={4}><img src="/photo-1.jpg" alt="Team at desk" /><img src="/photo-2.jpg" alt="Product screenshot" /><img src="/photo-3.jpg" alt="Dashboard view" /></MediaMasonry>

Related components

← Back to docs