CSS Flexbox Generator
Build Flexbox layouts visually and copy the CSS for the container and items.
Flex settings
Preview and CSS
Recent layouts on this device
How this tool works
Method. Choose the direction, justification, alignment and wrapping, set the gap and how many sample boxes to show, and adjust item grow and shrink. The preview updates live and the CSS below covers both the container and its items.
Limits. From 2 to 12 sample boxes; gap from 0 to 50 px.