Flexbox Playground

See exactly how each flexbox property moves items. Change the container settings, add or remove items and copy the resulting container CSS.

Last updated: · Runs 100% in your browser

// controls
Presets
12px
5
Live preview
Generated CSS
.container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

// Example output

.container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

// Features

  • ▸flex-direction and flex-wrap
  • ▸justify-content, align-items, align-content
  • ▸Gap control
  • ▸1–12 preview items
  • ▸Copy container CSS

// How to use

  1. 01Adjust the controls on the left or pick a preset to start the Flexbox Playground.
  2. 02Watch the live preview update instantly as you change each setting.
  3. 03Fine-tune the generated CSS by hand in the code panel if you like.
  4. 04Click Copy CSS or Download CSS, or Share to send a link to your design.

// FAQ

Your data never leaves your browser. This tool runs 100% locally — no upload, no logging, no analytics on your inputs.

// Related tools