# Separator

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

A thin visual divider between sections of content. Supports both
horizontal and vertical orientations.

```python
from refast.components import Separator

Separator()                              # default: horizontal
Separator(orientation="vertical", class_name="h-6")
```

Above the separator

Below the separator

```python
Separator(orientation="horizontal")
```

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Axis of the separator line |
| `decorative` | `bool` | `True` | When `True`, hidden from the accessibility tree |
| `class_name` | `str` | `""` | Extra Tailwind classes (e.g. `"h-6"` for vertical) |

## Horizontal (default)

```python
Column(
    gap=4,
    children=[
        Heading("Section One", level=3),
        Paragraph("Content of section one."),
        Separator(),
        Heading("Section Two", level=3),
        Paragraph("Content of section two."),
    ]
)
```

## Vertical

Use a `class_name` to constrain the height or let it fill flexbox height.

```python
Row(
    align="center",
    gap=4,
    class_name="h-10",
    children=[
        Text("Item A"),
        Separator(orientation="vertical"),
        Text("Item B"),
        Separator(orientation="vertical"),
        Text("Item C"),
    ]
)
```

## Non-decorative (Semantic)

For content where the separator has meaning (e.g. separating form sections):

```python
Separator(decorative=False)
```

---

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).
