# Separator

A horizontal or vertical rule, labelled where a stack needs a break.

## Web 0.2.0

### Usage

Place a separator between distinct groups. Choose its orientation to match the layout.

### Accessibility

Use semantic separation only when it conveys structure. Keep purely visual rules decorative.

### When to use

Use when spacing alone does not make grouping clear. Do not use repeated rules as a substitute for headings.

### Install

Add this registry to your project's components.json once, before the first install. Keep your existing settings and other registries.

```json
{
  "registries": {
    "@maeso": "http://127.0.0.1:4321/r/{name}.json"
  }
}
```

Then install the registry's default theme once, and import its sheet in the CSS entry that imports Tailwind. It paints every item from this registry.

```sh
npx shadcn@latest add @maeso/maeso
```

```css
@import "./styles/theme.web.css";
```

```sh
npx shadcn@latest add @maeso/separator
```

### Props

#### Separator

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| label | string \| undefined | no | Turns the rule into a labelled break in a stack. |
| orientation | "horizontal" \| "vertical" \| undefined | no |  |
| spacing | string \| undefined | no | A CSS length applied on the axis across the rule. |
| style | CSSProperties \| undefined | no |  |

##### Inherited

Also accepts 1 inherited prop

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| weight | "hairline" \| "standard" \| "strong" \| undefined | no |  |

### Proof

#### Contrast

measured on 0.2.0

| State | Foreground | Background | Ratio | Floor |
| --- | --- | --- | --- | --- |
| default | rgb(67 77 86) | rgb(248 245 240) | 7.93 | AA 4.5 |
| default (dark) | rgb(181 182 182) | rgb(7 21 34) | 9.07 | AA 4.5 |

#### Size

5484 gzip bytes · measured on 0.2.0

### Example

```tsx
import { Separator } from "@/components/ui/_kit/display/separator/Separator";

const Example = () => (
		<div className="w-full max-w-105">
			<Separator label="Details" />
		</div>
	);
export default Example;
```

### Preview · 0.2.0

not on native yet
