HelpTribe.

Separator

Visual divider for separating content sections. Uses the neutral border color for subtle, non-intrusive separation.

Installation

$ npx shadcn@latest add separator

Preview

Content above

Content below

Orientations

Horizontal separator

Content below

Side by side

Usage (React/TSX)

import { Separator } from "@/components/ui/separator"

export default function Example() {
  return (
    <div>
      <p>Content above</p>
      <Separator />
      <p>Content below</p>
    </div>
  )
}

Usage (HTML/CSS)

<hr class="ds-separator" />

<style>
  .ds-separator {
    border: none;
    height: 1px;
    background: #e4e4e7;
    width: 100%;
  }
</style>

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"The direction of the separator.
decorativebooleantrueIf true, not announced by screen readers.
classNamestringβ€”Additional CSS classes to apply.

Design Notes

  • Uses neutral border color (#e4e4e7) for subtle separation.
  • 1px height for horizontal, 1px width for vertical.
  • Decorative by default β€” not announced by screen readers.