Skip to content
All designer tools

Flexbox Playground

Every flex property against a live row — including the two that look like grow settings and are not

Click a box to edit it. The dashed rail is the flex container — 100% of the space available.

cssCSS
.row {
  display: flex;
  gap: 12px;
}
htmlHTML
<div class="row">
  <div class="item-1">Item 1</div>
  <div class="item-2">Item 2</div>
  <div class="item-3">Item 3</div>
</div>
htmlTailwind (container)
flex gap-[12px]

Now use it on something

Every effect, block, page and template in the catalog is styled against tokens shaped exactly like these — so they take your values rather than fighting them.

Hand these tokens to an agent

npx shadcn@latest add https://hoverlab.dev/r/hoverlab.json

Which way the main axis runs
What happens when they run out of room
Along the main axis
Across the cross axis
The wrapped lines as a group

Needs flex-wrap: wrap — with one line there is nothing to distribute.

Gap12px

Space between items. Flex gaps do not collapse and do not appear on the outside edge, so this is not the same as a margin on every child.

One value emits the short gap: 12px. Off, you get gap: row column.

flex: initial
flex-grow0

Share of the leftover space this item claims. Zero means it never gets any. Two items at 1 and 2 split the surplus one-third / two-thirds — the ratio is between siblings, not a multiplier on the item.

flex-shrink1

How readily it gives space back when the row overflows. One is the default, which is why items you never touched still get squeezed. Zero pins the width and pushes the overflow onto everyone else.

The size it starts from, before grow and shrink argue about the rest. This is the property behind the most common flexbox surprise: flex: 1 means 1 1 0% and makes items equal, while flex-grow: 1 alone leaves the basis at auto and only shares out the surplus, so wordier items stay wider. Set 0% here to see them equalise.

order0

Moves the item without moving the markup. Negative pulls it earlier. Worth knowing that this reorders paint only — tab order and screen readers still follow the DOM, so a visual order that contradicts the source is a real accessibility bug.

Overrides align-items, for this one
Content length2 words

Preview only. How many words this box carries — the only thing that makes a basis of auto look different from a basis of zero.

Container width100%

Preview only. Narrow it until the row overflows — that is where flex-shrink, flex-wrap and the min-width trap below all start to matter.

The cure for the overflow nobody can explain: min-width computes to auto on a flex item, not zero, so an item will not shrink below its longest unbreakable word no matter what flex-shrink says. Narrow the container above with this off, then turn it on.

3

Keep this row. This browser remembers what you last had open. A free account remembers the ones you name, on every machine you use.

More designer tools

All 36 run in the tab — no account, no upload.See all