Separator
LayoutHorizontal or vertical divider line between sections.
Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.
"use client";
import { Separator } from "@dashboardpack/core/components/ui/separator";
export default function SeparatorExample() {
return (
<div className="w-full max-w-sm space-y-4">
<div>
<p className="font-medium">Workspace settings</p>
<p className="text-sm text-muted-foreground">
Manage your team and preferences.
</p>
</div>
<Separator />
<div className="flex h-5 items-center gap-4 text-sm">
<span>Profile</span>
<Separator orientation="vertical" />
<span>Billing</span>
<Separator orientation="vertical" />
<span>Security</span>
</div>
</div>
);
}Usage
Separate related sections horizontally, or place a vertical separator inside a container with an explicit height.
import { Separator } from "@dashboardpack/core/components/ui/separator";Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.
API reference
Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.
| Prop | Type / Default | Description |
|---|---|---|
| orientation | horizontal | verticalDefault: horizontal | Direction of the dividing line. |
| decorative | booleanDefault: true | Hide a purely visual divider from assistive technology. |
| className | stringDefault: — | Set length and spacing. |