Visual divider component to separate content sections with 6% opacity of primary text color
import { Separator } from "@/components/ui/separator";
// Horizontal separator (default)
<Separator />
// Vertical separator in flex container
<div className="flex gap-4">
<div>Left content</div>
<Separator orientation="vertical" />
<div>Right content</div>
</div>orientation="horizontal"orientation="vertical"orientation="vertical" className="h-6"Separate content sections
{ orientation: "horizontal" }First section content goes here
Second section content goes here
Separate menu items with DesignList
{ orientation: "horizontal" }Vertical separator in flex layout
{ orientation: "vertical" }Separate toolbar sections with DesignButton
{ orientation: "vertical" }Between stat items
{ orientation: "vertical" }Separate card sections with DesignCard
{ orientation: "horizontal" }Main card content goes here
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | "horizontal" | "vertical" | "horizontal" | Direction of the separator |
| decorative | boolean | true | If false, adds separator role for accessibility |
| className | string | - | Custom CSS classes (e.g., margins, fixed height) |
// The separator automatically stretches to fill the container height <div className="flex gap-4"> <div className="flex-1">Left content</div> <Separator orientation="vertical" /> <div className="w-64">Right content</div> </div>
// Use className for fixed height in toolbars, navigation <div className="flex items-center gap-2"> <DesignButton variant="tertiary" size="small">Button 1</DesignButton> <Separator orientation="vertical" className="h-6" /> <DesignButton variant="tertiary" size="small">Button 2</DesignButton> </div>
// Add margin via className for spacing <DesignCard> <DesignCardContent>Content above</DesignCardContent> <Separator className="my-4" /> <DesignCardContent>Content below</DesignCardContent> </DesignCard>
--color-font-primary for subtle, theme-aware divisionself-stretch to automatically fill flex container heightclassName="h-6" (or desired height)decorative={false} when the separator has semantic meaning for screen readers