CSS flexbox generator
Build a flex container and its items visually, then copy the CSS, Tailwind classes or inline style.
CSS flexbox generator
Set flex-direction, flex-wrap, justify-content, align-items and align-content with dropdowns, add a gap in any unit, and this tool writes the flex container rule for you — along with a matching rule for its items and a small text preview showing how the boxes line up. Use it to sketch a navbar, a card row, a form toolbar or any layout that needs items distributed, centered or wrapped without reaching for a full grid.
The item controls apply flex-grow, flex-shrink and flex-basis uniformly across the number of items you choose, which is exactly how most real flex rows work: one item class governing several boxes rather than one-off values per box. Align-content only appears in the output when flex-wrap is set to wrap or wrap-reverse, because browsers ignore it otherwise — the tool never prints a declaration that does nothing.
Pick the output format that matches how you build: plain CSS for a stylesheet, Tailwind utility classes (arbitrary-value brackets cover gaps and bases that don't sit on the default spacing scale), or an inline style attribute for a quick prototype or email-safe markup. Every value updates the moment you change an option, and the layout preview redraws with it — no build step, no external CSS to load.
Everything runs locally in your browser; nothing you configure here is sent anywhere. When the CSS looks right, copy it, download it as a .txt file, or send it back into the input to keep iterating with another tool.