Bento Grid Layout Generator
Mixed-size tiles in a tight, deliberate arrangement: one hero tile, a tall one, a wide one and small ones around them.
Reading order Matches the DOM here. It does not at Tablet — move the width ruler there to see which elements swap.
Named areas. The CSS is a picture of the layout, and only the properties that actually change get repeated inside each media query.
.bento {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: minmax(140px, auto) minmax(140px, auto) minmax(140px, auto) minmax(120px, auto) minmax(120px, auto);
gap: 12px;
grid-template-areas:
"feature feature"
"tile-a tall"
"tile-b tall"
"wide wide"
"tile-c tile-c";
}
.bento > .feature { grid-area: feature; }
.bento > .tile-a { grid-area: tile-a; }
.bento > .tall { grid-area: tall; }
.bento > .tile-b { grid-area: tile-b; }
.bento > .wide { grid-area: wide; }
.bento > .tile-c { grid-area: tile-c; }
@media (min-width: 640px) {
.bento {
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: minmax(150px, auto) minmax(150px, auto) minmax(140px, auto) minmax(140px, auto);
gap: 14px;
grid-template-areas:
"feature feature tall"
"feature feature tall"
"tile-a tile-b tile-c"
"wide wide wide";
}
}
@media (min-width: 1024px) {
.bento {
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: minmax(160px, auto) minmax(160px, auto) minmax(160px, auto);
gap: 16px;
grid-template-areas:
"feature feature tile-a tall"
"feature feature tile-b tall"
"wide wide wide tile-c";
}
}
How this layout works
A bento grid, named after the compartments of a bento box and made familiar by product launch pages, is an ordinary CSS grid with deliberately uneven spans. The layout here uses four equal columns and three fixed-height rows; the tiles span 2×2, 1×2, 3×1 and 1×1 cells.
The discipline is in the tile sizes. Keep to a small set, such as one large, one tall, one wide and a few small, and repeat them. When every tile is its own size the grid stops reading as a system and looks accidental.
Fixed row heights do the rest. minmax(140px, auto) on every row keeps the tiles in proportion instead of letting each row collapse to its content, while still letting a row grow if a tile has more text than fits.
On narrow screens the same tiles reflow into fewer columns: three on tablet, two on phones. The feature tile stays first in the HTML so it is also first for keyboard and screen-reader users. That is safer than grid-auto-flow: dense, which fills gaps by moving tiles away from their source order.
Every property used here is listed in the CSS Grid cheat sheet, with the reason to reach for it.
Frequently asked questions
What is a bento grid?
How do I make a bento grid in CSS?
grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(160px, auto), then make chosen tiles span with grid-column: span 2 or a named area. The editor above writes it for every breakpoint.What makes a bento grid look right?
How do I make a bento grid responsive?
Can I build a bento grid with Tailwind?
grid grid-cols-2 md:grid-cols-4 on the container and col-span-2 row-span-2 on the large tile. The Tailwind grid generator writes the classes for each breakpoint.How do I center a grid in CSS?
justify-content: center on the grid container to centre the whole grid inside it, and margin-inline: auto with a max-width to centre the container in the page. These are different jobs: the first moves the tracks within the container, the second moves the container itself.How do I center items inside a CSS grid?
place-items: center on the container. That is shorthand for align-items plus justify-items, and it centres every item inside its own cell on both axes. For a single item, use place-self: center on that item instead.How do I make a CSS grid responsive?
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) and it reflows at every width with no media queries at all. Add breakpoints only when the exact column count matters, or when the layout has to change shape rather than just wrap.When should I use CSS Grid instead of Flexbox?
How to use it
-
Open the pattern
The bento grid loads into the editor already responsive, with every breakpoint set up.
-
Change the tracks
Edit the column and row sizes in the Tracks panel. Anything valid in a track list works.
-
Redraw at another width
Move the ruler past a breakpoint marker and rearrange. Only the placement changes.
-
Copy the code
Take CSS, HTML, Tailwind or a shadcn component. The media queries are already written.
More in App UI
- Responsive Card Grid
- Kanban Board
- Chat App Layout
- Email Client Layout
- Calendar Month View
- Settings Page
- Login Page Layout