Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. flex-flow

flex-flow

A shorthand property that sets both 'flex-direction' and 'flex-wrap' together.

Sample Code

/* Horizontal layout, no wrapping (same as initial value) */
.container { display: flex; flex-flow: row nowrap;}

/* Horizontal layout with wrapping */
.container-wrap { display: flex; flex-flow: row wrap;}

/* Vertical layout with wrapping */
.container-col { display: flex; flex-flow: column wrap;}

Available Values

ValueDescription
<flex-direction>One of 'row', 'row-reverse', 'column', or 'column-reverse'. Defaults to 'row' if omitted.
<flex-wrap>One of 'nowrap', 'wrap', or 'wrap-reverse'. Defaults to 'nowrap' if omitted.

Specification

ItemDetails
Initial valuerow nowrap
Applies toFlex containers (elements with 'display: flex' or 'display: inline-flex')
InheritedNo
AnimationNo (discrete)

Browser Compatibility

Chrome Chrome
29+
28
27
26
25
24
23
22
21
↑ Requires prefix '-webkit-'
20 or earlier ×
Firefox Firefox
28+
27 or earlier ×
Safari Safari
9+
8
7
↑ Requires prefix '-webkit-'
6 or earlier ×
Edge Edge
12+
Supported in all versions
IE IE
11
10 ×
9 ×
8 ×
7 ×
6 ×
Opera Opera
12.1+
11 or earlier ×
iOS Safari iOS Safari
9+
8
7
↑ Requires prefix '-webkit-'
6 or earlier ×
Android Android Browser
4.4+
3 or earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop version
Firefox Android Firefox Android
Latest
Same support as desktop version

※ Version data based on MDN / Can I Use.

Overview

'flex-flow' is a shorthand property that lets you specify both 'flex-direction' and 'flex-wrap' on one line. Either value can be omitted, in which case the default ('row' or 'nowrap') is applied.

Common Combination Illustrations

row nowrap (default) A B C row wrap A B C column nowrap A B C column wrap A B C

Common Combinations

ValueMeaning
flex-flow: row nowrapHorizontal, no wrapping (default)
flex-flow: row wrapHorizontal with wrapping (most commonly used)
flex-flow: column nowrapVertical, no wrapping
flex-flow: column wrapVertical with wrapping
flex-flow: row-reverse wrapHorizontal reversed with wrapping

Pattern: Responsive Layout

Desktop — flex-flow: row wrap A B C Mobile — flex-flow: column nowrap A B C

/* Desktop: horizontal with wrapping → Mobile: vertical */
.layout {
    display: flex;
    flex-flow: row wrap;
    gap: 20px;
}
@media (max-width: 768px) {
    .layout {
        flex-flow: column nowrap;
    }
}

Related Properties

PropertyDescription
flex-directionSpecifies the direction of the main axis. Corresponds to the first value of 'flex-flow'.
flex-wrapSpecifies wrapping behavior. Corresponds to the second value of 'flex-flow'.

If you find any errors or copyright issues, please .