Component guideEditable source

Separator

A visual divider between related groups of content.

Original component docs
On this page4 sectionsBack to top

Use Separator sparingly to clarify a boundary. It renders the Base UI separator primitive; it is not a heading and does not name either side of the content.

Live preview
Loading preview...

#Installation

Complete the base setup. For manual installation:

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/separator.json

#Usage

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

export default function SectionDivider() {
  return (
    <div className="grid max-w-sm gap-4">
      <h2 className="font-bold">Workspace</h2>
      <p>Shared project settings.</p>
      <Separator aria-hidden="true" />
      <p>Members can manage their own notifications.</p>
    </div>
  );
}

#API reference

PropPurposeDefault
orientationhorizontal or verticalhorizontal
classNameLength, spacing, and layoutTheme border color
aria-hiddenHide a decorative divider from assistive technologyUnset
renderPrimitive element compositionSeparator primitive

#Accessibility

Hide purely decorative dividers from assistive technology. Give vertical separators a parent with a defined height. Use headings and spacing for document structure rather than placing a separator between every sentence.