Skip to content
Flexbox Playground

Flexbox Playground

v1.2

Tune every flex container and item property and watch the layout glide into place. Click an item in the preview to inspect and edit it individually.

Runs locally — nothing leaves your browser.

Building in two dimensions? Try CSS Grid Generator
Container
Direction

The main axis items are placed along, and which way it runs.

Wrap

Whether items wrap onto new lines once they run out of room.

Justify content

How items are spaced along the main axis (horizontal when row, vertical when column).

Align items

How items align on the cross axis (vertical when row, horizontal when column).

Align content

Only affects wrapped containers — set Wrap above to see it.

Gap

The space between adjacent items and wrapped lines.

Items (3/16)
Item 1
Grow
Shrink
Basis
Align self

Overrides align-items for just this one item.

Order
Content
Preview
1
2
3

Drag an item to move it (the underlying source order changes, not just its visual order) — or focus it and hold Alt with an arrow key: Left/Up moves it earlier, Right/Down later.

Output

Click any item in the preview (or its number above) to select and edit it · every change is remembered on this device and never leaves the tab.