You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react/src/grid/index.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,24 @@ import { Grid } from 'tiny-design';
25
25
26
26
## When To Use
27
27
28
-
- Use `Grid System` (`Row` / `Col`) for classic page columns, marketing layouts, and 24-column responsive structure.
29
-
- Use `Grid` for dashboard shells, editor workbenches, card walls, named areas, row spanning, and two-dimensional composition.
30
-
- If you are migrating from MUI `Grid`, start with `spacing`, `rowSpacing`, `columnSpacing`, `size`, and `offset`, then adopt `areas` or `rowSpan` when you need layouts that flex grids cannot express.
28
+
Grid is a two-dimensional layout component built on CSS Grid. It excels when you need control over both rows **and** columns simultaneously.
29
+
30
+
-**Dashboard shells** — define named `areas` like `"sidebar header" "sidebar main"` for application-level page structure.
31
+
-**Card walls / galleries** — use `minColumnWidth` with `autoFit` to create responsive card grids that reflow without manual breakpoints.
32
+
-**Data-dense UIs** — use explicit `columns` and `rows` to build spreadsheet-like or calendar-like layouts where items span multiple rows or columns.
33
+
-**Asymmetric layouts** — use `Grid.Item colSpan` and `rowSpan` to create hero sections or featured cards that span across tracks.
34
+
-**Responsive rearrangement** — pass responsive objects to `columns`, `gap`, and `areas` to radically change the layout across breakpoints (e.g. stacking sidebar below content on mobile).
| Best for | Dashboards, card walls, named areas, row spanning | Classic page columns, form layouts, marketing pages |
43
+
| Responsive | Responsive props on any value | Breakpoint props (`xs`–`xxl`) on Col |
44
+
45
+
- If you are migrating from **MUI Grid**, start with `spacing`, `rowSpacing`, `columnSpacing`, `size`, and `offset`, then adopt `areas` or `rowSpan` when you need layouts that flex grids cannot express.
0 commit comments