About this Flexbox and CSS Grid playground
Learn and prototype CSS layouts by changing Flexbox and Grid properties and watching the result instantly. Adjust direction, wrapping, justify-content, align-items, grid-template-columns, auto-flow and gap, then copy the generated CSS.
How to use the Flexbox & Grid Playground
- Choose flex or grid.
- Change the properties and number of items.
- Copy the generated CSS.
Example
.container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }Frequently asked questions
When should I use Grid instead of Flexbox?
Use Flexbox for one-dimensional layouts (a row or a column) and Grid for two-dimensional layouts with rows and columns.
What does repeat(auto-fill, minmax(200px, 1fr)) do?
It creates as many columns of at least 200px as fit, stretching them to fill the row. It's a responsive grid without media queries.
Is my data safe?
Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.
Is it free?
Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.