Flexbox Playground
Experiment with CSS Flexbox properties on live items and copy the generated layout CSS.
—
Everything runs in your browser — nothing is uploaded.
About Flexbox Playground
The Flexbox Playground is a hands-on sandbox for CSS flexbox. Set the container properties — flex-direction, flex-wrap, justify-content, align-items, align-content and gap — and watch up to 12 live items reflow in the preview as you change each value. It is the quickest way to internalize what each property actually does.
Items are individually editable: click one to select it and adjust its flex-grow, flex-shrink, flex-basis, align-self and order. Seeing one item grow to swallow free space while its siblings hold their width teaches the flex sizing model faster than any diagram.
The playground generates clean CSS for the container and any items with non-default settings — copy it straight into your stylesheet. Everything runs in your browser with nothing uploaded, and a reset button returns you to a clean slate.
How to use Flexbox Playground
- Set the container’s flex-direction, wrap, justify-content, align-items, align-content and gap.
- Add or remove items — between 2 and 12 — to mirror your real component.
- Click an item and tune its grow, shrink, basis, align-self and order.
- Watch the live preview update with every change.
- Copy the generated CSS and paste it into your project.