Skip to content

Commit f8c1f5a

Browse files
committed
docs(Grid): clarify support for direction='column'
1 parent 2a2d08f commit f8c1f5a

File tree

1 file changed

+11
-6
lines changed
  • docs/data/material/components/grid

1 file changed

+11
-6
lines changed

docs/data/material/components/grid/grid.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,16 @@ It cannot wrap other elements.
243243

244244
## Limitations
245245

246-
### Column direction
246+
### Column Direction (`direction="column"`)
247247

248-
Using `direction="column"` or `direction="column-reverse"` is not supported.
249-
The Grid component is specifically designed to subdivide a layout into columns, not rows.
250-
You should not use the Grid component on its own to stack layout elements vertically.
251-
Instead, you should use the [Stack component](/material-ui/react-stack/) inside of a Grid to create vertical layouts as shown below:
248+
The `Grid` component **supports `direction="column"`** for creating vertical layouts. This allows for stacking child elements in a **column**, which is commonly used for responsive layouts.
252249

253-
{{"demo": "ColumnLayoutInsideGrid.js"}}
250+
**Example:**
251+
252+
```tsx
253+
<Grid container direction="column">
254+
<Grid item>Item 1</Grid>
255+
<Grid item>Item 2</Grid>
256+
<Grid item>Item 3</Grid>
257+
</Grid>
258+
```

0 commit comments

Comments
 (0)