Masonry layout

Also called masonry grid, Pinterest layout, or waterfall layout

A layout of columns where items of different heights stack tightly with no row lines, like stones in a wall or a Pinterest board.

What is Masonry layout?

In a masonry layout, each new item drops into whichever column is currently shortest, so tall and short items pack together without the gaps a regular grid leaves when items in a row have different heights. Columns stay aligned while rows stagger. It suits photos, pins, notes, and testimonials whose heights vary.

The order runs roughly left to right but hops between columns, so masonry is better for browsing than for content people read in sequence. Give items one fixed width, keep the gaps even, and reserve each image’s height up front with width and height or aspect-ratio so items do not jump as photos load.

CSS columns: 3 looks similar, but it fills the first column top to bottom before starting the next, which scrambles the order. Native CSS masonry is still rolling out across browsers, so most sites place items with a few lines of JavaScript or a small library.

Often confused with

Bento grid
A bento grid uses planned tile sizes that line up on a shared grid. A masonry layout accepts items of any height and packs them into columns.
All terms

CSS Grid

A CSS layout system that places items on rows and columns at once, so content lines up in both directions.

Bento grid

A grid of rounded tiles in mixed sizes that fit together like a bento lunch box, often used to show several features at once.

Stagger

Animating a group of items one after another with a small delay between each, so they arrive as a cascade.

Lazy loading

A technique that waits to load images, videos, or code until they are about to scroll into view, so the first screen loads faster.