CSS Flexbox Playground

Experiment with CSS Flexbox properties using an interactive live preview. Copy-ready code for any layout. Free online, no signup.

Preparing private browser tool…

Your file will stay on this device.

Frequently asked questions

justify-content vs align-items?
justify-content aligns on the main axis, align-items aligns on the cross axis. Switching flex-direction swaps which is which.
flex-grow vs flex-basis?
flex-basis sets initial size before free space distribution. flex-grow controls how much extra space the item absorbs.
How to wrap items?
Set flex-wrap: wrap on the container. Use gap for consistent spacing.
Can I set flex values per item?
Yes. Each of the 3 to 8 items has its own grow, shrink, and basis, and those become .item-1 to .item-N rules in the output alongside the container rule.
Which container properties are covered?
flex-direction, justify-content, align-items, flex-wrap, and gap up to 48 px. align-content and per-item align-self are not exposed.