Build Flexbox and Grid layouts by adjusting real boxes, with presets, per-item controls, warnings for settings that do nothing, and CSS that matches the preview.
Initializing in your browser…
Create CSS keyframe animations visually: presets, easing curves and steps, a live preview, reduced-motion support and clean CSS to copy.
Cut elements into shapes with CSS clip-path: 16 presets, draggable points, circles and rounded insets, with CSS checked before you copy it.
Create frosted glass CSS with blur, tint, border and shadow controls, presets, a live preview and help when the effect looks flat.
You are building a navigation bar: a logo on the left, a group of links in the middle and a button on the right. You start from the Space Between layout, then wonder why making the links grow broke the spacing.
Space Between, then flex-grow 1 on item 2
Container flex-direction row, flex-wrap nowrap,
justify-content space-between, align-items center,
gap 16px, padding 8px
Items three, each min-width 80px
Preview 762px wide (746px inside the padding)What the preview and the CSS show
.container {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
align-content: normal;
gap: 16px;
padding: 8px;
min-height: 400px;
}
Before item 1 at 8px, item 2 at 341px, item 3 at 674px, each 80px wide
After item 1 at 8px, item 2 at 104px and 554px wide, item 3 at 674px
[warning] justify-content shares out free space, and an item with
flex-grow above 0 takes all of it, so this setting appears
to do nothing.Three 80px items and two 16px gaps use 272px of the 746px inside the container, leaving 474px of free space. space-between puts it into the two gaps, so item 2 sits exactly in the middle at 341px. Give item 2 flex-grow: 1 and it absorbs all 474px, growing to 554px, and there is nothing left for justify-content to share. That is the right result for a navigation bar whose middle should fill the space; if you wanted the links to stay compact and centred, keep flex-grow at 0 and let space-between do the work.
Build a CSS layout by changing properties and watching real boxes move. Switch between Flexbox and Grid, start from a common layout such as a sidebar, a holy grail page or a dashboard, adjust the container and each item, and copy CSS that reproduces exactly what the preview shows.
Flexbox for a row or a column. A flex container lays its children out along one axis. justify-content shares out the free space along that axis, align-items positions items across it, and flex-wrap decides whether items move to a new line when they run out of room. Each item has flex-grow, flex-shrink and flex-basis, which together decide how much of the free space it takes or gives back. Try the Equal Width preset and then change one item's flex-grow to see the space being shared.
Grid for rows and columns together. A grid container defines tracks with grid-template-columns and grid-template-rows, and items fill them in order or span several. The column field accepts any value CSS does, including repeat(12, 1fr), minmax(200px, 1fr) and repeat(auto-fill, minmax(200px, 1fr)), and tells you how many columns it makes. A value the browser cannot read is flagged with the part that is wrong, because a browser silently drops it and falls back to a single column. Each item can span columns and rows or start on a given line, and grid-auto-flow: row dense fills the holes that spans leave behind.
Settings that seem to do nothing. Two classic puzzles are called out as they happen. align-content only aligns the lines of a wrapping container, so it does nothing with flex-wrap set to nowrap. justify-content only moves free space around, so once an item has flex-grow above zero there is none left to share. A grid item that spans more columns than the grid has is flagged too: the browser adds narrow extra columns instead of clamping the span.
CSS that matches the preview. The CSS tab lists every declaration the preview uses, including each item's padding, minimum sizes and colour, under the class names .container and .item-1, .item-2 and so on. Paste it onto a container of the same width with the same children and you get the same layout. Rename the classes to suit your project and delete the colours you do not need.
Everything runs in your browser, and nothing you build is uploaded.
Start from Sidebar Layout: a 250px sidebar with flex-basis and a main area with flex-grow 1 that takes the rest.
Pick Responsive Cards in Grid mode. repeat(auto-fill, minmax(200px, 1fr)) fits as many 200px columns as the container allows.
Use the Dashboard preset, then give one item a column span of 2 and a row span of 2 to make a featured tile.
Use Flexbox when items sit in a single row or column and their own sizes should drive the layout, such as a navigation bar or a button group. Use Grid when you want rows and columns to line up, such as a page layout or a card gallery. They combine well: Grid for the page, Flexbox inside each area.
It distributes free space, and an item with flex-grow above zero takes all of it. Set flex-grow back to 0, or use margins or gap for spacing instead.
It aligns the lines of a wrapping flex container. With flex-wrap set to nowrap there is only one line, so use align-items to position the items instead.
Both create as many columns as fit. auto-fill keeps empty columns when there are too few items to fill a row, while auto-fit collapses them so the items stretch to fill the width.
So it reproduces the preview exactly. Item padding changes item sizes, which changes the layout. Keep the layout properties and remove the colours, font weight and border radius if you do not want them.
Lines are numbered from 1 at the start edge, and negative numbers count back from the end edge, so a column start of -1 means the last line of the explicit grid. Line 0 does not exist.
Yes. gap adds space between flex items and between wrapped lines, never at the outer edges, and it is supported in all current browsers.
This runs as client-side JavaScript. Keys, tokens, payloads, and other inputs never leave your device.