JM CSS Grid Lab is a local layout desk. Nothing you paint, type, or copy is posted to a server. Use it to draft a page frame, then paste the output into your own stylesheet.
Pick a mode and a template
Start with CSS Grid or Flexbox. The eight production templates switch the mode for you: SaaS Dashboard, Bento Grid, 3-Column Pricing, Holy Grail, Blog Two-Column, and Portfolio Masonry use Grid; Sticky Top Bar uses Flexbox; Split Hero is a 50/50 Grid with centered alignment.
Paint rectangular areas
In Grid mode, choose an area name or type a custom token such as header, sidebar, or main, then click cells in the preview to paint or merge them. A named area is written into grid-template-areas only when it forms a solid rectangle. An L-shape or a gap is dropped back to a dot so the CSS stays valid.
Tune Flexbox items
In Flexbox mode, set the axis, wrapping, alignment, and gap, then click an item to edit flex-grow, flex-shrink, and flex-basis. You can keep between two and eight items.
Preview widths and copy code
Desktop uses the full preview pane. Tablet constrains the stage to 768px and mobile to 375px. The CSS tab includes a max-width 768px hint that stacks areas or flex items. Copy CSS, HTML, or Tailwind from this tab; the text never leaves the browser unless you paste it somewhere else.
grid-template-areas only accepts solid rectangles. If a name forms an L or has a hole, the desk keeps the paint in the preview for you to fix, but it emits a dot for that name so the stylesheet stays valid.
Does a template upload anything?
No. Templates, previews, and exports are generated in this tab. The page does not post your layout to a server.