---
title: "Columns"
subtitle: "<Columns> (alias <Grid>) and <Column> form a 1–4 column layout that stacks on narrow screens."
---

A general-purpose multi-column layout (alias `<Grid>`), 1–4 columns, collapsing on narrow screens:

```mdx
<Columns cols={2}>
  <Column>
    **Left column**: any Markdown and components.
  </Column>
  <Column>
    **Right column**: code blocks, images…
  </Column>
</Columns>
```

<Columns cols={2}>
  <Column>
    **Left column**: any Markdown and components.
  </Column>
  <Column>
    **Right column**: code blocks, images…
  </Column>
</Columns>

<ParamField path="cols" type="number" default="2">Number of columns, 1–4 (`columns` also works).</ParamField>
<ParamField path="widths" type="string">Column widths separated by spaces: numbers are proportions (`2 1` → two thirds / one third), `*` an equal share, or lengths such as `40%` / `320px`. Applies from 768px wide; narrower screens stack as usual. In the visual editor, drag the gap between columns to resize (columns to the right scale proportionally); double-click for equal widths.</ParamField>

## Custom column widths

```mdx
<Columns widths="2 1">
  <Column>**Two thirds**: body text, code samples…</Column>
  <Column>**One third**: side notes</Column>
</Columns>
```

<Columns widths="2 1">
  <Column>**Two thirds**: body text, code samples…</Column>
  <Column>**One third**: side notes</Column>
</Columns>
