How to build a Flexbox or Grid layout
Tweak the controls, watch the preview update live, and copy the exact CSS into your project.
1. Pick a mode
Flexbox for one-dimensional layouts, Grid for two-dimensional ones.
2. Adjust the controls
Direction, alignment, wrapping, columns and gap — see it change instantly.
3. Copy the CSS
Paste the generated class straight into your stylesheet.
Flexbox is best for a single row or column of items that need to align, distribute or reorder. Grid is best for two-dimensional layouts — rows and columns at once — including responsive card grids using repeat(auto-fit, minmax(...)), which wraps to fewer columns on narrow screens with no media queries. Everything runs client-side — this is a static CSS generator, not a live editor for your own page. For shadows and glass effects, try the CSS Shadow Generator or Glassmorphism Generator.