Demos

A horizontal separator between a heading and the content below it.

Usage

Use a separator to split groups that would otherwise run together. Spacing alone is often enough. Reach for a line only when it is not.

Import it from @workspace/ui/components/separator.

Anatomy

  • Separator — A one-pixel line in the border color.

Notes

  • A vertical separator stretches to the height of its row. Give the row a height, such as h-5.
  • Use margin classes like my-4 to set the space around it.

Examples

Vertical

Set orientation="vertical" between inline items. The parent needs a height.

Props

These are the props you set most often. Unlisted props pass through to the underlying element.

Separator

PropTypeDefaultDescription
orientation"horizontal" or "vertical"horizontalDirection of the line.
classNamestring—Classes merged onto the element.