← All tools

Flexbox Generator

Tune flex containers and per-item grow, shrink, basis, order, and align-self with a live preview and CSS or Tailwind export. All local.

This tool runs entirely in your browser. Your input is never uploaded.

Presets
1
2
3
4
5
CSS
display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: stretch; gap: 12px;
Tailwind
flex flex-row flex-nowrap justify-start items-stretch gap-[12px]

Flex items (5)

Live flex playground

Adjust flex-direction (including reverse directions), flex-wrap, justify-content, align-items, and align-content with instant feedback. Row and column gaps are set independently, and demo children can be added or removed one at a time or by count.

Per-item properties

Each demo child has its own flex-grow, flex-shrink, flex-basis (auto or px), order, and align-self. Only non-default values are serialized, so the output stays clean. The Navbar preset demonstrates the classic trio: a fixed-width logo, a growing menu, and a static action area.

Export

  • CSS: a complete display: flex; ... container declaration, followed by one .flex-item:nth-child(n) { ... } rule per customized child.
  • Tailwind: one arbitrary-value class string; item properties use [&>*:nth-child(n)] arbitrary variants such as [&>*:nth-child(2)]:[flex:2_1_auto].

Your settings are saved in this browser; layouts saved by an older version migrate automatically. All processing happens locally.

Related tools

A growing collection of browser-only tools. Your data stays on your device whenever the browser can handle the task.