Make your AI a shadcn expert

Shadcn Separator

React separator for menus, forms, and list rows. Built with TypeScript and Tailwind CSS for Next.js using Base UI — horizontal or vertical, decorative by default.

A separator is a 1px rule between two blocks. Default is horizontal; orientation="vertical" stands it up in a row. Use it between form groups, menu items, and list rows — not as a substitute for a heading.

Scroll to load preview...

Looking for a neobrutalism version for shadcn?

Same separator, thicker borders. The NeoBrutalism separator is the kit if you want that look.

Usage

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

orientation="vertical" for a row. Leave decorative on unless the line itself is the structure.

Composition

Separator

Vertical

orientation="vertical" in a row that already has a height. The primitive is h-full when vertical, so the parent owns the size.

Scroll to load preview...

Vertical rules between labeled items. Hide the last pair on small screens if the row wraps.

Scroll to load preview...

List

A horizontal rule between each key-value row.

Scroll to load preview...

RTL

Wrap with DirectionProvider and dir="rtl". The line is the same; the copy flips.

Scroll to load preview...

API

Prop

Type

Notes

Don't fight the data-orientation height

The primitive sets data-[orientation=horizontal]:h-px. A bare h-1 loses. Override with the same variant, or put the height on the parent — the vertical demo uses h-5 on the row, not on the line.

decorative defaults to true, so screen readers skip it. Prefer a heading when the break is a real section.

With other components

Questions

Was this page helpful?

Sign in to leave feedback.