Skip to content

Separator

Layout

Horizontal or vertical divider line between sections.

HorizontalVertical
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Separate related sections horizontally, or place a vertical separator inside a container with an explicit height.

Import
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.

Separator props
PropType / DefaultDescription
orientationhorizontal | vertical

Default: horizontal

Direction of the dividing line.
decorativeboolean

Default: true

Hide a purely visual divider from assistive technology.
classNamestring

Default: —

Set length and spacing.

Build with these too