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 grid · 6 children
Generated CSS

How to use

  1. Pick a layout mode at the top — Grid for 2D row/column layouts, Flexbox for 1D distributions.
  2. Drag the Children slider to add or remove numbered boxes from the preview. In Flexbox mode, click a box to select it for per-child styling.
  3. Adjust properties in the right panel. The preview updates instantly and the generated CSS at the bottom reflects every change.
  4. Hit Load sample to try a preset layout — a 3-column card grid for Grid mode, or a navbar pattern for Flexbox mode.
  5. Use Copy to grab the CSS and paste it into your own stylesheet. Reset clears everything back to defaults.