FlowToolkit
Dev

Flexbox Generator

Visualise and generate CSS Flexbox layouts.

Loading tool…

About this tool

Experiment with flex-direction, justify-content, align-items, flex-wrap, and gap settings in real time. See how child items behave as you adjust each property, then copy the CSS output.

Flexbox, visualised

Flexbox is the workhorse of one-dimensional CSS layout. The properties are simple individually but interact in ways that can be hard to predict — changing justify-content affects how space is distributed, changing align-items shifts cross-axis alignment, and flex-wrap changes how items flow to new lines.

This generator lets you toggle every flex container property and watch numbered items re-layout in real time. Use it to learn how flex properties interact, or to quickly produce a flex declaration for a layout you already have in mind.

Properties explained

  • flex-direction — sets the main axis (row, column, or reversed).
  • justify-content — distributes space along the main axis (start, end, center, between, around, evenly).
  • align-items — aligns items along the cross axis (start, end, center, stretch, baseline).
  • flex-wrap — controls whether items wrap to new lines or shrink to fit.
  • gap — sets spacing between items, independent of alignment.

Frequently asked questions

What Flexbox properties are supported?

Flex-direction (row, column, reverse), justify-content (all 6 values), align-items (all 5 values), flex-wrap (3 values), and gap.

Can I see how items respond to different settings?

Yes. The live preview updates instantly as you change any setting. Items are numbered so you can see reordering with row-reverse and column-reverse.

What CSS output does it produce?

The complete flex container declaration: display, flex-direction, justify-content, align-items, flex-wrap, and gap.