Loading Layout Studio...
The Ultimate Bento Grid Generator and Tailwind Layout Studio
Design visually. Drag, resize, and prototype advanced CSS Grid and Flexbox Bento layouts. Export production-ready code for React, Vue, Svelte, and Figma instantly.
The twelve-column scaffold behind every bento layout
Every layout in the builder sits on a twelve-column grid by default, and that number is not arbitrary. Twelve divides evenly by two, three, four, and six, so halves, thirds, quarters, and sixths all land on whole column boundaries. A bento layout is really a composition of these clean divisions: a hero cell spanning all twelve columns, two feature cards at six each, three stat cards at four each, a wide cell at eight beside a sidebar at four. When spans map to exact fractions of the track, the browser never rounds, and edges align without subpixel hairline gaps.
Spans are proportional, not fixed. col-span-6 on a twelve-column canvas means half the track width at any viewport. Column spans run col-span-1 through col-span-12; row spans run row-span-1 through row-span-6. Grid is two-dimensional, so a cell can be wide, tall, or both, and its neighbors flow around the rectangle it claims. The builder clamps spans when you shrink the column or row count, so reducing a twelve-column canvas to six cannot leave a col-span-8 that no longer fits.
Mobile-first spans: how `col-span-12 md:col-span-6 lg:col-span-4` composes
Tailwind's responsive system is mobile-first. Unprefixed classes apply at every viewport; prefixed classes take over only when their media query matches. The string col-span-12 md:col-span-6 lg:col-span-4 reads as a layering order: full width on phones, half width from 768 pixels up, one-third from 1024 pixels up. The md: rule wins over the base rule above 768 pixels because it lives inside a matching media query. Below 768 pixels it does not apply at all.
The builder models this directly. Each cell stores three independent span values, base, md, and lg, on both axes. Editing is viewport-aware: dragging a resize handle with the mobile preview active adjusts the base span; the tablet preview targets the md span; desktop targets lg. The inspector offers the same three-way control as numeric steppers. You are never stretching one value across breakpoints. You are composing three layouts that the browser selects between as the viewport changes.
Planning spans across viewports: what changes and what stays fixed
A common mistake is treating every breakpoint as a fresh design. Content priority is usually stable across viewports; what changes is how that priority is expressed when columns shrink. A cell that deserves half the track on desktop typically deserves the full track on mobile. The pattern col-span-12 md:col-span-6 lg:col-span-4 works because it expresses one idea, one of three equals, across three column budgets.
Gap and padding belong in the same planning pass. The builder supports independent horizontal and vertical gaps (gap-x-*, gap-y-*), and these values are breakpoint-agnostic. Keep them consistent with the span rhythm: a card dropping from six columns to twelve does not need a new gap value, it needs the same gutter so the canvas reads as one system. Give tall cells explicit row-span values instead of relying on content height, since a two-row span locks two row tracks and shifts every auto-placed cell after it.
Grid shell, flexbox interior: giving each engine the job it does best
Bento layouts are a two-layer problem. CSS Grid runs the shell: the outer container defines columns, rows, and gaps, and each cell claims a rectangular region with column and row spans. This is the only reliable way to build asymmetric layouts, because grid tracks cells on both axes at once. Flexbox cannot do this. A flex container lays items along one axis, and each wrapped row is independent, so cells in different rows can never align their columns.
Flexbox earns its place inside the cells. A card with an icon, heading, paragraph, and call-to-action is a one-dimensional stacking problem: elements in a column, spaced with gap, aligned with items-* and justify-*. The builder generates this inner structure per cell and lets you change its alignment without touching the grid position. For complex regions, container cells nest further: a cell becomes a sub-grid or sub-flex container with child cards carrying their own spans and gaps. Nest when a cell genuinely holds a sub-layout, like a dashboard widget with a chart beside a stat list. Keep the canvas flat otherwise; a twelve-column shell with well-chosen spans covers most bento designs on its own.
Alignment, gaps, and the invisible arithmetic of tracks
Three values decide whether a bento grid feels inevitable or fragile: gap, padding, and alignment. Gaps are dead space between tracks. They do not consume spans, but they do consume pixels, so twelve columns plus eleven gutters must fit inside the container width minus padding. The builder emits standard gap-* utilities and lets the browser distribute the remainder.
Alignment defaults do quiet work. Containers use stretch unless you change it, so every cell fills its track rectangle and cells with different content heights still share clean edges. Switch a cell to top alignment and you opt out deliberately: the card shrinks to its content height while the track keeps its size. Check this in the preview, because alignment surprises are the most common reason a layout looks right in the builder and wrong in production. It is not a bug; the grid is behaving exactly as specified with a configuration you did not intend.
From canvas to codebase: nine export targets and a JSON round-trip
A layout that cannot leave the tool is a sketch. The builder exports Tailwind HTML, React JSX, plain CSS, pure CSS plus HTML, Vue SFC, Svelte, styled-components, React Native, and Figma JSON from the same internal state. The React Native export is the interesting one: React Native has no CSS grid, so the generator converts column spans into flex ratios inside a wrapping row container, emitting a StyleSheet.create block. The Figma JSON export produces an importable frame with sized cells and configured gaps, so the design file and the codebase start from the same source of truth.
Every export ships with a JSON snapshot of the full layout state: spans, breakpoint values, widget assignments, gaps, and styling. Importing that file restores the layout exactly, which makes the JSON the durable artifact. Store it in version control next to the generated code and the design source never drifts from the shipped output.
Sharing layouts as compressed URLs
Collaboration needs no accounts or backend. The layout state is serialized to JSON, compressed losslessly, and encoded into the URL fragment as #layout=. A complex twelve-cell layout typically compresses under two thousand characters, short enough for a pull request comment. Anyone opening the link gets the exact layout, including half-finished span edits. Nothing is stored on a server, nothing expires, and the state never leaves the browser unless you share the link. Three candidate layouts become three URLs compared in three tabs.
Related reading: the Tailwind CSS grid guide covers column syntax and auto-fit patterns, the CSS grid cheatsheet is a quick property reference, and the gallery has bento-style starting points like the bento grid card and masonry columns.
Frequently Asked Questions
Frequently Asked Questions
Ready to Build Responsive Bento Grids?
Designing responsive, modern layouts should be a visual process, not a math puzzle. The Bento Grid Generator handles the heavy lifting of calculating column and row spans across different viewport sizes, allowing you to focus on the structure and content of your UI. Whether you are generating React JSX for a dashboard, Vue SFCs for a marketing page, Svelte components for a web app, or raw Tailwind HTML for a prototype, this visual grid builder delivers clean, optimized code in seconds. Try the grid generator now, apply one of the pre-built content widgets, configure your breakpoints, and copy the code to jumpstart your next frontend layout.
In-depth guide
Tailwind CSS Grid Guide: Layouts, Responsive Grids & Examples
Master grid columns, spanning, responsive breakpoints, and auto-fit layouts with copy-paste examples.
Keep exploring
- CSS Grid Cheatsheet
Interactive CSS Grid reference with live demos.
- Bento Grid Card
Bento-style grid card layout.
- Masonry Columns
Pinterest-style masonry column layout.