# flex-flow

> The `flex-flow` CSS property is a shorthand for setting both the `flex-direction` and `flex-wrap` properties.

## What does flex-flow: row wrap do in CSS?

The shorthand property that combines `flex-direction` and `flex-wrap` properties into a single declaration. It controls both the direction in which flex items are laid out and whether they should wrap onto multiple lines if there's not enough space in the flex container.

- Topic: Flexboxes
- Type: property
- Browser support: Chrome 29+, Chrome Android 29+, Edge 12+, Firefox 28+, Firefox Android 28+, Safari 9+, Safari iOS 9+

## Example

```css
.tags {
  display: flex;
  flex-flow: row wrap;
}
```

'row wrap' sets `flex-direction` and `flex-wrap` in one declaration, so the tags line up in a row and wrap onto new lines.

## Common mistakes

- Putting `justify-content` values into `flex-flow`.

## Key points

- The shorthand lists direction and wrap, like `flex-flow: row wrap`, not alignment values.
- Wrapped rows set `gap` for spacing instead of margins on each item.

## Interview questions

### What is the default value of flex-flow?

It is `row nowrap`: items sit in one horizontal line and do not wrap.

### Can I set only wrap with flex-flow?

Yes. `flex-flow: wrap` sets wrapping and resets direction to 'row'.

## Related cards

- [flex-direction](https://wonderium.dev/css/flex-direction.md)
- [flex-wrap](https://wonderium.dev/css/flex-wrap.md)
- [flex](https://wonderium.dev/css/flex.md)
- [gap](https://wonderium.dev/css/gap.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/flex-flow
- Last updated: 2026-11-25
