# Column

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/column
- **Markdown:** https://refast.fastapicloud.dev/docs/components/column.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/layout/column.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

Vertical flex container (`flex flex-col`) for stacking children top-to-bottom.

```python
from refast.components import Column

Column(
    children=[
        Heading("Title", level=2),
        Text("Subtitle text"),
        Button("Call to action"),
    ],
    gap=4,
    align="start",
)
```

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `children` | `list \| Component \| None` | `None` | Child components |
| `justify` | `"start" \| "end" \| "center" \| "between" \| "around" \| "evenly"` | `"start"` | justify-content |
| `align` | `"start" \| "end" \| "center" \| "stretch" \| "baseline"` | `"stretch"` | align-items |
| `gap` | `int` | `2` | Gap between children (Tailwind spacing unit) |
| `wrap` | `bool` | `False` | Whether children wrap |
| `id` | `str \| None` | `None` | Unique element ID |
| `class_name` | `str` | `""` | Extra Tailwind classes |

## Notes

`Column` defaults `align` to `"stretch"` (unlike `Row` which defaults to `"start"`),
so children fill the column's cross-axis width by default.

## Examples

```python
# Form field stack
Column(
    gap=4,
    children=[
        Input(label="Name", placeholder="Your name"),
        Input(label="Email", type="email"),
        Button("Submit"),
    ],
)

# Sidebar navigation
Column(
    gap=1,
    class_name="w-48",
    children=[NavLink(href=r) for r in routes],
)
```

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
