Grid
A responsive grid layout builder using CSS Grid properties and Tailwind utilities.
Revenue
$12,480
+8.2%
Active users
3,214
+12%
Churn
1.9%
-0.4%
Weekly traffic
Last 12 weeks
Installation
pnpm dlx nachui add gridAnatomy
API Reference
Grid
| Prop | Type | Default | Description |
|---|---|---|---|
as | React.ElementType | 'div' | The element type to render the component as |
columns | '1' | '2' | ... | '12' | 'none' | 'subgrid' | '1' | Number of columns in the grid |
rows | '1' | '2' | ... | '6' | 'none' | 'subgrid' | - | Number of rows in the grid |
flow | 'row' | 'col' | 'dense' | 'row-dense' | 'col-dense' | - | Grid layout flows |
align | 'start' | 'center' | 'end' | 'baseline' | 'stretch' | - | Align children along block axis |
justify | 'start' | 'center' | 'end' | 'stretch' | - | Justify children along inline axis |
gap | '0' | '1' | ... | '32' | - | Spacing between items on both axes |
gapX | '0' | '1' | ... | '32' | - | Spacing between columns |
gapY | '0' | '1' | ... | '32' | - | Spacing between rows |
className | string | - | Custom CSS classes |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.