CSS Flexbox Playground

Interactive playground to learn and generate Flexbox layouts

Share this tool

Report a problem

Describe the problem without including private input or files.

How useful was this tool?

How useful was this tool?

Layout settings

Preset layouts

Per-item overrides

Select an item in the preview or the list to edit its properties.

Flexbox quick reference

Main axis

justify-content controls alignment along the main axis (determined by flex-direction).

Cross axis

align-items controls alignment along the cross axis (perpendicular to flex-direction).

Multi-line

align-content only applies when flex-wrap is set to wrap or wrap-reverse with multiple lines.

Live preview

Generated CSS

.container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  align-content: stretch;
  gap: 10px;
}

Change the settings or select an item. The preview and CSS update together.

About CSS Flexbox Playground

The CSS Flexbox Playground is a visual, interactive tool for learning and experimenting with CSS Flexbox layouts. Flexbox (Flexible Box Layout) is one of the most powerful and widely used CSS layout modules, designed to arrange items within a container with flexible, responsive behavior. This tool lets you manipulate every flex container and flex item property in real time and see exactly how your layout changes.