# Grid

Equal columns, fixed or auto-fit to a minimum width, with a token gap.

- Family: layout
- Import: `import { Grid } from "@senvenli/react/layout";`
- Page: https://design.senvenli.com/docs/components/grid
- JSON: https://design.senvenli.com/docs/components/grid.json

## Example: Auto-fit columns

As many equal columns as fit, none narrower than `minColumnWidth`.

```tsx
import { Text } from "@senvenli/react/display";
import { Box, Grid, Stack } from "@senvenli/react/layout";

const PROJECTS = [
  { name: "Website redesign", tasks: "12 open tasks" },
  { name: "Mobile app", tasks: "8 open tasks" },
  { name: "Billing migration", tasks: "3 open tasks" },
  { name: "Help center", tasks: "5 open tasks" },
];

export default function Example() {
  return (
    <Grid minColumnWidth={180} space="space-200">
      {PROJECTS.map((project) => (
        <Box key={project.name} padding="space-200" radius="large" border>
          <Stack space="space-050">
            <Text weight="medium">{project.name}</Text>
            <Text size="body-small" tone="subtle">{project.tasks}</Text>
          </Stack>
        </Box>
      ))}
    </Grid>
  );
}
```

## Examples

### Fixed columns

A set number of equal columns at every width.

```tsx
import { Text } from "@senvenli/react/display";
import { Box, Grid, Stack } from "@senvenli/react/layout";

const TOTALS = [
  { label: "Orders", value: "1,284" },
  { label: "Customers", value: "312" },
  { label: "Refunds", value: "9" },
];

export default function Example() {
  return (
    <Grid columns={3} space="space-150">
      {TOTALS.map((total) => (
        <Box key={total.label} padding="space-200" background="surface-sunken" radius="large">
          <Stack space="space-050">
            <Text size="body-small" tone="subtle">{total.label}</Text>
            <Text size="body-large" weight="medium" isNumeric>{total.value}</Text>
          </Stack>
        </Box>
      ))}
    </Grid>
  );
}
```

### A site footer

Link columns over a legal row with the language switcher, composed from Grid, Stack and Link.

```tsx
import { Link } from "@senvenli/react/action";
import { Separator, Text } from "@senvenli/react/display";
import { Box, Grid, Stack } from "@senvenli/react/layout";
import { LanguageSwitcher } from "@senvenli/react/action";
import { useState } from "react";

const COLUMNS = [
  { title: "Product", links: ["Features", "Pricing", "Changelog"] },
  { title: "Company", links: ["About", "Careers", "Status"] },
  { title: "Legal", links: ["Privacy policy", "Terms of service"] },
];

// A site footer is a Grid of link columns over a legal row: no component of its own, so every part stays yours.
export default function Example() {
  const [locale, setLocale] = useState<"en" | "de" | "tr">("en");
  return (
    <Box as="footer" padding="space-400" background="surface-sunken" radius="large">
      <Stack space="space-400">
        <Grid minColumnWidth={160} space="space-300">
          <Stack space="space-100">
            <Text weight="medium">Acme</Text>
            <Text size="body-small" tone="subtle">Invoices, orders and customers in one place.</Text>
          </Stack>
          {COLUMNS.map((column) => (
            <nav key={column.title} aria-label={column.title}>
              <Stack space="space-100">
                <Text size="body-small" weight="medium" tone="subtle">{column.title}</Text>
                {column.links.map((label) => (
                  <Link key={label} href="#" variant="subtle">{label}</Link>
                ))}
              </Stack>
            </nav>
          ))}
        </Grid>
        <Separator />
        <Stack direction="horizontal" space="space-200" justify="between" align="center">
          <Text size="body-small" tone="subtle">© 2026 Acme, Inc.</Text>
          <LanguageSwitcher locales={["en", "de", "tr"]} value={locale} onChange={setLocale} />
        </Stack>
      </Stack>
    </Box>
  );
}
```

## Guidelines

### When to use it

- Tiles or cards in columns.

### Use something else when

- [stack](https://design.senvenli.com/docs/components/stack.md): Children stack in one column or row.
- [split](https://design.senvenli.com/docs/components/split.md): Two or three panes need different widths.

## Accessibility

Built in:

- Layout only; no role.

## API reference

### Grid

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| padding | `Space` |  | no |  |
| paddingInline | `Space` |  | no |  |
| paddingBlock | `Space` |  | no |  |
| background | `Background` |  | no |  |
| radius | `Radius` |  | no |  |
| shadow | `Shadow` |  | no |  |
| border | `Border` |  | no |  |
| as | `LayoutElement` | `"div"` | no |  |
| space | `Space` |  | no |  |
| columns | `1 \| 4 \| 2 \| 3 \| 5 \| 6` |  | no |  |
| minColumnWidth | `number` |  | no | Auto-fit columns no narrower than this many pixels (never wider than the grid itself), as many as fit. The one length a layout prop takes. |

Also takes 375 standard DOM and ARIA attributes (id, aria-label, event handlers…).

### Tokens it reads

`--ds-background-brand-subtle`, `--ds-background-danger`, `--ds-background-information`, `--ds-background-neutral`, `--ds-background-selected`, `--ds-background-success`, `--ds-background-warning`, `--ds-border`, `--ds-border-bold`, `--ds-radius-full`, `--ds-radius-large`, `--ds-radius-medium`, `--ds-radius-small`, `--ds-shadow-overflow`, `--ds-shadow-overlay`, `--ds-shadow-raised`, `--ds-space-0`, `--ds-space-025`, `--ds-space-050`, `--ds-space-075`, `--ds-space-100`, `--ds-space-1000`, `--ds-space-150`, `--ds-space-200`, `--ds-space-250`, `--ds-space-300`, `--ds-space-400`, `--ds-space-500`, `--ds-space-600`, `--ds-space-800`, `--ds-surface`, `--ds-surface-overlay`, `--ds-surface-raised`, `--ds-surface-sunken`

## Related

- [stack](https://design.senvenli.com/docs/components/stack.md)
- [card](https://design.senvenli.com/docs/components/card.md)
