CSS Grid & Flexbox Playground
A live workbench for two of CSS's most useful layout systems. Adjust the controls, watch the layout move, and copy the generated CSS into your own project. No frameworks, no fluff.
Preview
Generated CSS
How to use
- Pick a layout mode at the top —
Gridfor 2D row/column layouts,Flexboxfor 1D distributions. - Drag the
Childrenslider to add or remove numbered boxes from the preview. In Flexbox mode, click a box to select it for per-child styling. - Adjust properties in the right panel. The preview updates instantly and the generated CSS at the bottom reflects every change.
- Hit
Load sampleto try a preset layout — a 3-column card grid for Grid mode, or a navbar pattern for Flexbox mode. - Use
Copyto grab the CSS and paste it into your own stylesheet. Reset clears everything back to defaults.