> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# flex-flow

APISummary
## Introduction

This property is a shorthand for the CSS properties: [`flex-direction`](/next/api/css/properties/flex-direction.md) and [`flex-wrap`](/next/api/css/properties/flex-wrap.md), specifies the direction of a flex container, as well as its wrapping behavior.

## Examples

**This is an example below: css-api**

**Entry:** `src/flex-flow`
**Bundle:** `dist/flex-flow.lynx.bundle`

```tsx
import { root } from "@lynx-js/react";
import "./index.scss";

const FlexFlow = () => {
  const flowStyle = {
    flexFlow: "row wrap" as const,
  };

  const flow2Style = {
    flexDirection: "row" as const,
    flexWrap: "wrap" as const,
  };

  const item1Style = {
    backgroundColor: "rgba(0,255,0,0.2)" as const,
    flexShrink: 0,
    width: "50%",
  };

  const item2Style = {
    backgroundColor: "rgba(0,0,255,0.2)" as const,
    flexShrink: 0,
    marginLeft: "10px",
  };

  const item3Style = {
    backgroundColor: "rgba(255,0,0,0.2)" as const,
    flexShrink: 0,
    marginLeft: "10px",
  };

  const item4Style = {
    backgroundColor: "rgba(255,0,0,0.2)" as const,
    flexShrink: 0,
    marginLeft: "10px",
  };

  return (
    <scroll-view className="root" scroll-orientation="vertical">
      <text>flex-flow: row wrap</text>
      <view className="container" style={flowStyle}>
        <view className="height" style={item1Style}>
          <text>Item One</text>
        </view>
        <view className="height" style={item2Style}>
          <text>Item Two</text>
        </view>
        <view className="height" style={item3Style}>
          <text>Item Three</text>
        </view>
        <view className="height" style={item4Style}>
          <text>Item Four</text>
        </view>
      </view>
      <text>flex-direction: row; flex-wrap: wrap</text>
      <view className="container" style={flow2Style}>
        <view className="height" style={item1Style}>
          <text>Item One</text>
        </view>
        <view className="height" style={item2Style}>
          <text>Item Two</text>
        </view>
        <view className="height" style={item3Style}>
          <text>Item Three</text>
        </view>
        <view className="height" style={item4Style}>
          <text>Item Four</text>
        </view>
      </view>
    </scroll-view>
  );
};

root.render(<FlexFlow />);

```

v0.11.0



## Syntax

```css
/* flex-flow: <'flex-direction'> */
flex-flow: row;
flex-flow: row-reverse;
flex-flow: column;
flex-flow: column-reverse;

/* flex-flow: <'flex-wrap'> */
flex-flow: nowrap;
flex-flow: wrap;
flex-flow: wrap-reverse;

/* flex-flow: <'flex-direction'> and <'flex-wrap'> */
flex-flow: row nowrap;
flex-flow: column wrap;
flex-flow: column-reverse wrap-reverse;
```

### Values

This property is a shorthand for the following CSS properties: [`flex-direction`](/next/api/css/properties/flex-direction.md) and [`flex-wrap`](/next/api/css/properties/flex-wrap.md)。

## Formal definition

| Initial value | as each of the properties of the shorthand: 
- flex-direction: row
- flex-wrap: nowrap |
| Applies to | flex containers |
| Inherited | no |
| Animatable |  |


## Formal syntax

```
flex-flow =
  <'flex-direction'>  ||
  <'flex-wrap'>

<flex-direction> =
  row             |
  row-reverse     |
  column          |
  column-reverse

<flex-wrap> =
  nowrap        |
  wrap          |
  wrap-reverse
```

## Compatibility

**Compatibility Table**

**Query:** `css.properties.flex-flow`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/146-flex-flow.json) · [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-flow)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| flex-flow | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`flex-flow`**

**Specifications:**

