Key Ideas
1What is Flexbox?. Flexbox is a one-dimensional layout system. "One-dimensional" means it arranges items along a single axis — either a row (horizontal) or a column (vertical). Compare t...
2Main Axis & Cross Axis. Flexbox revolves around two axes. The main axis is the primary direction items flow (set by flex-direction). The cross axis runs perpendicular to it.
3Container Properties. These properties go on the parent container. They control how children are arranged, spaced, and aligned.
4Child (Item) Properties. These properties go on individual flex items (the children), giving you per-item control over sizing, order, and alignment.
5Real-World Flex Patterns. Flexbox shines for common UI patterns. Here are the four most important ones you'll use constantly: