Skip to content

Layout

Grid

CSS grid layout primitive.

import { Grid } from '@var-ui/react';

Grid

CSS grid layout primitive.

columns takes "auto" (pack minmax(minColumnWidth, 1fr) tracks, default), a number for 1–8 fixed equal tracks (7 included), or a per-breakpoint count map like columns={{ base: 2, lg: 7 }} using the theme breakpoints (base, sm, md, lg, xl). minColumnWidth sets the minimum auto track width for columns="auto" — any CSS length, default size.field.minWidth (15rem).

Examples

Default

Static card

Plain content surface.

Another card

Second grid cell.
Demo.tsxTSX
import { Card, Grid } from '@var-ui/react';

<Grid columns={2} gap="md">
  <Card title="Static card">Plain content surface.</Card>
  <Card title="Another card">Second grid cell.</Card>
</Grid>

Props

Accessibility

Built on React Aria Components where applicable.