Separator
Server-safe hairline, horizontal or vertical, decorative by default, with an optional centered label like "or".
import { Separator } from "@/components/ui/separator";export function ProfileLinks() { return ( <div> <div className="flex h-5 items-center gap-3 text-sm"> <a href="/docs">Docs</a> <Separator orientation="vertical" /> <a href="/blog">Blog</a> </div> <Separator label="or" className="my-4" /> </div> );}<Separator>
decorativedefaulttruebooleanPurely visual (default). Set false when the line separates content for assistive tech.
labelstringCentered text on the line, e.g. "or". Horizontal only.
orientationdefault"horizontal""horizontal" | "vertical"Direction of the line.
| Prop | Type | Default |
|---|---|---|
decorativePurely visual (default). Set false when the line separates content for assistive tech. | boolean | true |
labelCentered text on the line, e.g. "or". Horizontal only. | string | — |
orientationDirection of the line. | "horizontal" | "vertical" | "horizontal" |
Also accepts every <div> prop.
* required. Every component also takes className.