Separator
LayoutA line between groups of content: horizontal by default, orientation="vertical" between items in a row. Screen readers announce it as a separator; decorative hides it from them.
import { Separator } from '@limerdev/zest'; Use for
Dividing sections of a card, menu or toolbar, or items in a row of links.
Don't
A border on a container instead of a line between its children. Separators that carry meaning screen readers should not hear: set
decorative.Examples
Basic
Horizontal between blocks, vertical between items in a row.
Order 1042
Acme AB · due 15 December
Draft 3 lines 12 400 kr
<script lang="ts">
import { Separator } from '@limerdev/zest';
</script>
<div class="w-full max-w-sm">
<p class="font-medium">Order 1042</p>
<p class="text-sm text-muted">Acme AB · due 15 December</p>
<Separator class="my-4" />
<div class="flex h-5 items-center gap-3 text-sm">
<span>Draft</span>
<Separator orientation="vertical" />
<span>3 lines</span>
<Separator orientation="vertical" />
<span>12 400 kr</span>
</div>
</div> Props
Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that
renders your own element, with props to spread on it).
Separator
| Prop | Type | Default | Description |
|---|---|---|---|
| decorative | boolean | false | Whether the separator is decorative and should be hidden from assistive technologies. |
| orientation | "horizontal" | "vertical" | "horizontal" | The orientation of the separator. |