PapaTools

Free CSS Flexbox Playground

Container

1
2
3

Items (3)

display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: stretch;
gap: 8px;

Something not working? Report a problem

About the Flexbox Playground

Experiment with every flexbox property — direction, wrap, justify-content, align-items and more — with a live preview and copy the generated CSS, all in your browser.

How to use the Flexbox Playground

  1. 1Adjust the container properties — flex-direction, flex-wrap, justify-content and align-items.
  2. 2Use the item controls to set flex-grow, flex-shrink and flex-basis on each child.
  3. 3Watch the live preview update instantly as you change any property.
  4. 4Copy the generated CSS for the container and paste it into your project.

Frequently asked questions

What is Flexbox?

Flexbox (Flexible Box Layout) is a CSS layout mode that makes it easy to arrange items in a row or column, distribute space, and align elements — even when their sizes are unknown or dynamic.

What is the difference between justify-content and align-items?

justify-content controls alignment along the main axis (the direction of flex-direction). align-items controls alignment along the cross axis — perpendicular to the main axis.

When should I use flex-wrap?

Use flex-wrap: wrap when you want items to move to the next line instead of shrinking to fit. This is the basis of most responsive flex-based grids.

Is this tool client-side only?

Yes — all rendering happens in your browser. No data is sent to a server.

More design tools

View all