Components
Visually or semantically separates content.
Playground
orientation="horizontal" and fills the available width.import { Separator } from "@workspace/ui/components/separator"
<div className="flex max-w-sm flex-col gap-4 text-sm">
<div className="flex flex-col gap-1.5">
<div className="leading-none font-medium">Westy Design System</div>
<div className="text-muted-foreground">
The foundation for Westy products.
</div>
</div>
<Separator />
<div>
A set of components built on the shared tokens, ready to compose.
</div>
</div>orientation="vertical" to divide items laid out in a row. The separator stretches to the height of the flex container, so give the row an explicit height or let the tallest item define it.<div className="flex h-5 items-center gap-4 text-sm"> <div>Blog</div> <Separator orientation="vertical" /> <div>Docs</div> <Separator orientation="vertical" /> <div>Source</div> </div>
<div className="flex w-full max-w-sm flex-col gap-3 text-sm">
<div className="flex items-center justify-between">
<span>Plan</span>
<span className="text-muted-foreground">Pro</span>
</div>
<Separator />
<div className="flex items-center justify-between">
<span>Seats</span>
<span className="text-muted-foreground">12</span>
</div>
<Separator />
<div className="flex items-center justify-between">
<span>Renews</span>
<span className="text-muted-foreground">Jan 1, 2027</span>
</div>
</div>role="none" and is ignored by assistive technology. Pass decorative={false} when the division carries meaning — the element is then exposed as role="separator" with the current orientation. Both render identically.{/* Ignored by screen readers */}
<Separator />
{/* Announced as a separator */}
<Separator decorative={false} /><div dir="rtl" className="flex h-5 items-center gap-4 text-sm"> <div>المدونة</div> <Separator orientation="vertical" /> <div>الوثائق</div> <Separator orientation="vertical" /> <div>المصدر</div> </div>
| Prop | Type | Default |
|---|---|---|
| orientation | "horizontal" | "vertical" | "horizontal" |
| decorative | boolean | true |
| asChild | boolean | false |
Tokens used
1 design tokens consumed by the Separator component.
--border
Border