Interfaces and CSSRuns in your browser

Flexbox Playground

Set the Flexbox direction, alignment, gaps, and wrapping. Generate container CSS without drag-and-drop editing or arbitrary CSS execution.

  • Direction/justify/align
  • Gap + wrap
  • Plain CSS output
Online tool

Try the tool

Add your data, choose the settings, and get the result.

Input

Result

display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
gap: 16px;
flex-wrap: wrap;
  • The tool emits a container declaration, not a full layout editor.

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Choose flex-direction.

  2. 2

    Tune justify-content, align-items, gap, and wrap.

  3. 3

    Copy the CSS declaration block.

02

What the tool can do

  • Core flex-direction values.
  • Core justify-content and align-items values.
  • Gap within the allowed range and a flex-wrap toggle.
03

Common use cases

  • Basic setup for a toolbar, card row, or navigation group.
  • Comparing alignment values before implementation.
  • Capturing a container declaration for UI kit documentation.
04

How it works inside

The output is limited to container-level declarations.

Gap is limited to 0–64 px for compact, predictable CSS.

05

Questions and answers

How can I centre items or distribute space between them?

Choose direction, alignment, and gaps. Check the sample result and copy the CSS for the parent container. Test your own item content and sizes on the actual page.

What should I do when items do not fit in one row?

Check wrapping and the available container width. The generator sets container rules; individual item widths, shrinking, and growing are configured separately. Use the preview as a starting point, then test real content.