Flexbox Generator
Arrange a real flex layout. Tune the container and each item, try different widths, then take the CSS, HTML, or Tailwind markup.
Live preview
960 × 320 px · Select an item in the preview to edit it.
Item 1
Item 2
Item 3
Items
Up to 12 items. At least one item is required.
.container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: stretch;
align-content: stretch;
gap: 16px;
padding: 24px;
height: 320px;
box-sizing: border-box;
}
.item-1 {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 180px;
order: 0;
align-self: auto;
min-width: 0;
padding: 16px;
box-sizing: border-box;
border-radius: 12px;
overflow-wrap: anywhere;
background: #dbeafe;
color: #172554;
}
.item-2 {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 180px;
order: 0;
align-self: auto;
min-width: 0;
padding: 16px;
box-sizing: border-box;
border-radius: 12px;
overflow-wrap: anywhere;
background: #bfdbfe;
color: #172554;
}
.item-3 {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 180px;
order: 0;
align-self: auto;
min-width: 0;
padding: 16px;
box-sizing: border-box;
border-radius: 12px;
overflow-wrap: anywhere;
background: #93c5fd;
color: #172554;
}Everything stays in your browser.
Related tools
Format references
Tool page updated: