Tool guide
About this tool.
- Flexbox lines items up along one main axis. Direction picks a row or a column, Distribution (justify-content) spreads items along that axis and Item alignment (align-items) positions them across it.
- Wrapping lets items move onto new lines. Multi-line distribution (align-content) then spreads those lines when the container has spare cross-axis space; on a single line it has no visible effect.
- The featured item gets its own flex and order rule under .layout > .item--featured, so you can see how one item grows, shrinks or moves without changing its siblings.
- Build navigation bars, toolbars, button groups and vertical stacks while watching alignment change.
- Compare No wrap with Wrap to see when items overflow and when they move to a new line.
- Tune one item’s flex-grow, flex-shrink, flex-basis and order without touching the others.
- Export the container and item rules, then apply them to your real markup and content.
Choose Direction and Wrapping, or pick a sample from Apply sample.
Set Distribution, Item alignment and Multi-line distribution, and drag Gap to change the space between items.
Use Featured item grow, Featured item shrink, Featured item basis and Featured item order to change the highlighted Search item in the live preview.
Copy the CSS or download flexbox.css and the css-flexbox-report.json audit.
- Distribution Space between, Item alignment Center, Gap 12 → justify-content: space-between; align-items: center; gap: 12px;
- Wrapping Wrap → flex-wrap: wrap; the preview shows eight items so several lines appear.
- Featured item grow 1, shrink 1, basis 120 → .layout > .item--featured { flex: 1 1 120px; order: 0; }
- Featured item grow 0.5, shrink 0.25 → flex: 0.5 0.25 120px; factors keep up to two decimals.
- Featured item order -1 → order: -1; Search moves to the front visually while the HTML order stays the same.
- Direction Row reverse → flex-direction: row-reverse; the first item in the HTML is drawn at the end of the row.
- Gap accepts 0–96 px, Featured item basis 0–800 px and Featured item order −12 to 12, as whole numbers. Grow and shrink accept 0–12 with up to two decimals; more decimals are rejected.
- Empty, nonnumeric and out-of-range values show an error instead of being clamped, and unknown choices are not replaced with defaults.
- order and the reverse directions change only the visual order. Tab order and screen reader order still follow the HTML.
- Multi-line distribution needs Wrap or Wrap reverse and spare cross-axis space before it changes anything.
- The CSS uses the class names .layout and .item--featured. Preview labels, colors and stage size are not exported.