Components · Layout
Grid
StableAdded v0.0.1
CSS Grid layout primitive.
import { Grid } from '@nexub/react';Playground
Props
Card 1
Card 2
Card 3
Card 4
<Grid cols={2} gap="md" className="w-full max-w-100">…</Grid>Examples
2-column
3-column
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| cols | string | number | — | Number of columns or a custom grid-template-columns value. |
| gap | string | number | — | Gap between grid cells using design tokens. |
| asChild | boolean | false | |
| flow | 'row' | 'column' | 'dense' | — | |
| rows | string | number | — |
On iOS & Android
Web only
Grid has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.