CSSAwwwards
+ Submit tool
Built-in toolFree · No signup

Flexbox Playground

Interactively configure every CSS flexbox property. Set flex-direction, wrap behaviour, justify-content, align-items, and gap on the container. Click any item to adjust its flex-grow, flex-shrink, and flex-basis individually. The live preview and CSS output update in real time.

Live Preview

1
2
3

Click a box to select it and edit its flex properties below.

Container

flex-direction

flex-wrap

justify-content

align-items

12px

Items (3/6)

CSS Output
.container {  display: flex;  flex-direction: row;  flex-wrap: wrap;  justify-content: flex-start;  align-items: stretch;  gap: 12px;} /* Individual items (if all same) */.item {  flex: 0 1 auto;}

How to use

01

Configure the container

Use the button groups to set flex-direction, flex-wrap, justify-content, and align-items on your container.

02

Adjust gap

Drag the gap slider to set spacing between flex items in the container.

03

Edit individual items

Click any numbered box in the preview (or in the items list) to select it and adjust its flex-grow, flex-shrink, and flex-basis.

04

Copy CSS

Hit Copy CSS to get the complete flexbox declarations for your container and items.

More CSS layout tools

From our directory of 30+ CSS tools.

Browse all →

Know a great CSS tool?

Submit it to the directory and help developers discover it.

Submit a tool →