Responsive Bento Grids in Tailwind: The Complete Guide
October 1, 2026 | 12 min read | Tailwind CSS
By Syed · Frontend Engineer & Creator of UITweak
Bento grids are the tile layouts Apple made famous: a mosaic of cards in different sizes that feels organized and premium at the same time. They are everywhere now, from SaaS feature sections to dashboards to portfolios. If you want to know how to create a bento grid with Tailwind CSS, the good news is that you only need a handful of grid utilities, col-span, row-span, auto-rows, and responsive prefixes, and this guide shows you the exact patterns with copy-paste examples.
Shortcut: sketch your tile layout visually in our free Tailwind Grid Builder, then apply the span patterns below to turn it into a bento grid.
1. What Makes a Grid a "Bento" Grid
A bento grid is a CSS grid where tiles span different numbers of columns and rows, like compartments in a bento box. The defining traits:
- Varied tile sizes: one hero tile spans 2x2, others are 1x1 or 2x1.
- Tight, even gaps: small uniform spacing, usually
gap-3orgap-4. - Soft rounded corners:
rounded-2xlorrounded-3xlon every tile. - Content-first: each tile holds one idea: a stat, a chart, a testimonial, an image.
2. The Basic Structure
Start with a grid, set the row height with auto-rows, and give tiles spans. This 4-column skeleton is the foundation of nearly every bento layout:
<div class="grid grid-cols-4 auto-rows-[180px] gap-4">
<div class="col-span-2 row-span-2 rounded-3xl bg-indigo-500">Hero tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
<div class="col-span-2 rounded-3xl bg-slate-200">Wide tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
</div>auto-rows-[180px] gives every implicit row a fixed height, so row-span-2 tiles are exactly twice as tall. Adjust the value to taste, or use auto-rows-fr style flexible rows inside a fixed-height container.
3. Making It Responsive
On mobile, bento grids should collapse into a simple stack. The pattern: single column by default, bento spans only from md: upward:
<div class="grid grid-cols-1 md:grid-cols-4 auto-rows-[140px] md:auto-rows-[180px] gap-4">
<div class="md:col-span-2 md:row-span-2 rounded-3xl bg-indigo-500">Hero tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
<div class="md:col-span-2 rounded-3xl bg-slate-200">Wide tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
<div class="rounded-3xl bg-slate-200">Tile</div>
</div>Because the spans are prefixed with md:, phones get a clean vertical stack with no horizontal scrolling and no squished tiles. This mobile-first collapse is the single most important responsive rule for bento layouts.
4. Filling the Gaps with grid-flow-dense
When tiles have mixed spans, the grid can leave awkward holes. grid-flow-dense tells the browser to backfill smaller tiles into empty cells:
<div class="grid grid-cols-4 auto-rows-[180px] gap-4 grid-flow-dense">
...
</div>Dense flow can reorder tiles visually relative to the DOM order, so use it for decorative mosaics, not for content where reading order matters for accessibility.
5. Recipe: Dashboard Bento
A classic admin layout: a large chart tile, stat tiles, and an activity feed:
<div class="grid grid-cols-1 md:grid-cols-6 auto-rows-[150px] gap-4">
<!-- Revenue chart: big hero tile -->
<div class="md:col-span-4 md:row-span-2 rounded-3xl bg-white dark:bg-slate-900 border p-6">
Revenue chart
</div>
<!-- Two stat tiles -->
<div class="md:col-span-2 rounded-3xl bg-white dark:bg-slate-900 border p-6">MRR</div>
<div class="md:col-span-2 rounded-3xl bg-white dark:bg-slate-900 border p-6">Churn</div>
<!-- Activity feed: tall tile -->
<div class="md:col-span-2 md:row-span-2 rounded-3xl bg-white dark:bg-slate-900 border p-6">
Activity
</div>
<!-- Wide footer tile -->
<div class="md:col-span-4 rounded-3xl bg-indigo-600 text-white p-6">
Upgrade banner
</div>
</div>6. Recipe: Feature Showcase Bento
The marketing pattern: a hero feature tile with a product screenshot, surrounded by smaller benefit tiles:
<div class="grid grid-cols-1 md:grid-cols-3 auto-rows-[200px] gap-4">
<div class="md:col-span-2 md:row-span-2 rounded-3xl overflow-hidden">
<img src="/screenshot.png" class="size-full object-cover" alt="Product screenshot" />
</div>
<div class="rounded-3xl bg-slate-100 dark:bg-slate-900 p-6">Fast</div>
<div class="rounded-3xl bg-slate-100 dark:bg-slate-900 p-6">Secure</div>
<div class="md:col-span-3 rounded-3xl bg-slate-900 text-white p-6">
Testimonial strip
</div>
</div>7. Polish: Hover, Dark Mode, Motion
- Hover lift:
transition-transform hover:-translate-y-1 hover:shadow-xlon tiles adds tactility without layout shift. - Dark mode: pair
bg-white dark:bg-slate-900withborderso tiles stay separated on dark backgrounds. - Staggered entrance: combine with the animation utilities from our Tailwind v4 @theme guide for a fade-up cascade across tiles.
- Images:
object-coverwithoverflow-hiddenon the tile keeps screenshots crisp inside rounded corners.
8. Common Mistakes
- Too many sizes: stick to 2 or 3 tile sizes. More than that looks chaotic, not premium.
- Forgetting mobile: always test the
grid-cols-1fallback. Unprefixed spans on small screens are the most common bento bug. - Inconsistent padding: give every tile the same inner padding (
p-6) so the mosaic feels unified. - Uneven row heights: without
auto-rows, rows size to content and the mosaic falls apart. Set it explicitly.
Sketch the tile map in our free Tailwind Grid Builder, then apply these span patterns to get a production-ready bento grid in minutes.
Making tile content fit: the inner layout pattern
auto-rows fixes the tile height, which means the content inside has to behave. The pattern I use on every tile: the tile itself is a flex column, the body takes the remaining space, and anything that must sit at the bottom gets mt-auto.
<div class="rounded-3xl bg-white p-6 flex flex-col min-h-0">
<h3 class="font-semibold">Revenue</h3>
<p class="text-3xl font-bold mt-2">$48.2k</p>
<p class="text-sm text-slate-500 mt-1">Up 12% this month</p>
<a href="#" class="mt-auto pt-4 text-indigo-600 text-sm font-medium">View report</a>
</div>Two details that save real debugging time. First, min-h-0 on the tile: grid items default to min-height: auto, which lets tall content force the row taller than your auto-rows value and breaks the mosaic. Second, images: wrap them in an overflow-hidden tile and give the img h-full w-full object-cover. Without h-full the image keeps its intrinsic height and the tile grows. With it, the image fills the fixed tile exactly.
Reading order: the accessibility cost of a mosaic
Screen readers and keyboard tab order follow the DOM, not the visual mosaic. That is fine until you use grid-flow-dense or order utilities to shuffle tiles visually. Then a sighted user sees tile A next to tile B, but the screen reader announces B before A, and tab order jumps around the grid in a way that looks broken. My rule: dense flow is for marketing mosaics with decorative content only. On dashboards, keep DOM order and visual order identical. If the hero tile must come first visually, put it first in the markup. One more concrete check: run through the grid with the Tab key before shipping. If focus jumps from the bottom tile back to the top, the visual order and DOM order have diverged, and you need to fix the markup, not the CSS.
Debugging bento layouts in DevTools
When the mosaic breaks, the cause is almost always one of three things. First, a tile with unbreakable content: a long URL, a wide table, or a chart canvas with a fixed width forces its column wider and the spans stop lining up. The fix is min-w-0 on the tile plus overflow handling on the content. Second, auto-rows fighting content: if one tile's content is taller than the row height, that row grows and every tile in it grows with it. Either raise the auto-rows value or clamp the content. Third, the grid overlay: both Chrome and Firefox show a grid badge in the Elements panel that draws the track lines on the page. Turn it on, and holes, misaligned spans, and stray implicit tracks become visible in seconds. I debug every bento layout with the overlay on. It turns a twenty-minute staring contest into a two-minute fix.
FAQ
What exactly is a bento grid layout?
A bento grid is a CSS grid where tiles span different numbers of columns and rows, like compartments in a Japanese bento box. One hero tile might span 2x2 while others are 1x1, creating a mosaic that feels organized but visually rich. Apple popularized the pattern in product pages and keynotes.
Why use CSS Grid instead of Flexbox for a bento layout?
Flexbox lays items out in one direction, a row or a column. Bento grids need two-dimensional control: tiles that span both columns and rows at the same time. Only CSS Grid gives you col-span and row-span together, which is the whole trick behind the mosaic look.
How do I make a bento grid responsive for mobile?
Start with grid-cols-1 and add spans only from md: upward. Phones get a clean vertical stack, tablets and desktops get the mosaic. Never use unprefixed col-span-2 on a layout that must work on small screens.
How many tiles should a bento grid dashboard have?
Five to eight tiles is the sweet spot for a dashboard: one hero tile (chart or key metric), two to four stat tiles, and one or two tall tiles (activity feed, list). Fewer than five looks empty; more than eight overwhelms. Stick to two or three distinct tile sizes max.
Can I build a bento grid without knowing CSS Grid?
Yes. Sketch the layout in our free Tailwind Grid Builder, which generates the grid classes visually, then apply the md:col-span-2 and md:row-span-2 patterns from section 2 above. You only need to understand spans, not the full Grid spec.
Try it: related UI elements
Revenue
$48.2k
12.4%
Stat Card
Copy code →
Featured tile
Spans two columns for emphasis
Fast
Secure
Bento Grid Card
Copy code →
2024
Launched v1.0
First public release with core features.
2025
Reached 10k users
Community growth milestone.
2026
What's next
Roadmap in progress.
Vertical Timeline
Copy code →
Masonry Columns
Copy code →