CSS Layout Playground
Build Flexbox and Grid layouts visually and copy the generated code.
Presets:
Container
Items (3)
Item 1
Item 2
Item 3
Preview
1
2
3
Generated Code
CSS
.container {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: stretch;
flex-wrap: nowrap;
gap: 8px;
}
.item {
min-width: 60px;
min-height: 60px;
}
.item-1 {
flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;
}
.item-2 {
flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;
}
.item-3 {
flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;
}HTML
<div class="container"> <div class="item item-1">Item 1</div> <div class="item item-2">Item 2</div> <div class="item item-3">Item 3</div> </div>