What CSS Flexbox Is and How This Playground Builds It
Flexbox is the CSS Flexible Box Layout — a one-dimensional model that arranges items along a single main axis (a row or a column) and distributes free space and alignment between them. The Flexbox Playground sets a live parent element to display: flex and exposes every container property (flex-direction, flex-wrap, justify-content, align-items, align-content, gap / row-gap / column-gap) as segmented controls, so the visual preview is a genuine DOM flex container the browser lays out on the user’s device rather than an image.
- display: flex turns an element into a flex container; its children become flex items
- The main axis follows flex-direction (row = horizontal, column = vertical); the cross axis is perpendicular
- justify-content aligns items on the main axis; align-items aligns them on the cross axis
- align-content aligns wrapped lines and only applies when flex-wrap allows multiple lines
- gap (and row-gap / column-gap) sets the spacing between items with universal modern-browser support
