CSS columns technique creates a self-organizing grid where cards of varying heights fill each column top-to-bottom. Zero JavaScript, pure CSS masonry that works in every browser.
break-inside-avoidvarying heights — natural flowFilter by category and watch the grid reflow. Each card has a different aspect ratio — that is the whole point of masonry. Hover to reveal the overlay actions.
Nature Photography
Illustration
UI Design
Street Photography
Concept Art
Brand Identity
Landscape
Digital Painting
Layout Study
Astrophotography
Pixel Art
Typography
No JavaScript. No layout library. Just three CSS properties and a responsive column count.
columns-1sm:columns-2lg:columns-3xl:columns-4break-inside-avoidPrevents card split across columns
mb-4 (not gap)Column gap handled with margin-bottom
overflow-hidden on containerRequired for Confined Zoom
width: 100% of columnCards never set explicit width
height: autoLet content determine height
aspect-ratio on imagesPrevents layout shift
Why not CSS Grid masonry?
grid-template-rows: masonry is a draft spec requiring browser flags. CSS columns is universally supported with zero polyfills or JavaScript bridges needed.
Every card type follows the same masonry rules — break-inside-avoid, overflow-hidden for Confined Zoom, and overlay-reveal actions on hover.
Photo cards — Confined Zoom + Overlay Reveal
Portrait
Square Shot
Vertical
Landscape
Four named interaction patterns from the masonry-flow aiRules. Hover or interact with each card to feel the exact specified behavior.
group-hover:scale-105 duration-700
Image scales inside overflow-hidden — never breaks container boundary
Hover to see scale contained within border
hover:-translate-y-1 + diffused shadow
Max 4px lift. Soft diffused shadow, never a hard border ring.
Hover me
Hover to float with diffused shadow
opacity + translate — card size unchanged
Overlay and buttons slide in. Card never resizes or shifts layout.
Hover to reveal overlay without resizing card
duration-200 on filter/category buttons
Top filters respond in 200ms — feels instant, never laggy.
Click to switch — feel the instant 200ms feedback
Compare: card hover uses 300ms — only filters use 200ms for snappy feel.
Every rule in the masonry-flow style definition distilled into actionable guidance. These constraints enforce visual consistency across all generated UIs.
group-hover:scale-105
duration-700Always inside overflow-hidden
hover:-translate-y-1
diffused shadowMax 4px, no hard borders
opacity + translate
card size lockedContent floats in, card stays
duration-200
filters onlyInstant category feedback