This template demonstrates all CSS Flexbox properties with examples. Each section covers a specific property, its possible values, and a visual example.
display: flexEstablishes a flex container, enabling flexbox layout for its children.
flex-directionDefines the main axis direction: row, row-reverse, column, column-reverse.
flex-wrapControls whether items wrap to new lines: nowrap, wrap, wrap-reverse.
flex-flowShorthand for flex-direction and flex-wrap, e.g., row wrap.
justify-contentAligns items along the main axis: flex-start, flex-end, center, space-between, space-around, space-evenly.
align-itemsAligns items along the cross axis: stretch, flex-start, flex-end, center, baseline.
align-contentAligns flex lines when there’s extra space on the cross axis: flex-start, flex-end, center, space-between, space-around, space-evenly, stretch.
gapSets spacing between flex items: single value for all gaps or row-gap column-gap.
orderControls the order of flex items (default is 0; negative or positive integers reorder items).
flex-growDefines how much an item grows relative to others (default is 0).
flex-shrinkDefines how much an item shrinks relative to others (default is 1).
flex-basisSets the initial size of a flex item before growing/shrinking (e.g., auto, 100px, 50%).
flexShorthand for flex-grow, flex-shrink, and flex-basis, e.g., flex: 1 1 auto.
align-selfOverrides align-items for a specific item: auto, flex-start, flex-end, center, baseline, stretch.