Separator
A hairline that divides content horizontally or vertically.
"use client"
import { Separator } from "@/components/ui/separator"
export default function SeparatorDemo() {
return (
<div className="w-64">
<div className="text-mac-body font-semibold">CupertinoUI</div>
<p className="text-mac-subheadline text-mac-label-secondary">macOS components for shadcn/ui.</p>
<Separator className="my-3" />
<div className="flex h-4 items-center gap-3 text-mac-body">
<span>Docs</span>
<Separator orientation="vertical" />
<span>Blocks</span>
<Separator orientation="vertical" />
<span>Themes</span>
</div>
</div>
)
}Installation
pnpm dlx shadcn@latest add @cupertinoui/separatorThe first install also adds the macOS theme. See Installation to set up the registry.
Usage
import { Separator } from "@/components/ui/separator"
<Separator />API Reference
Every part forwards the props of the underlying Base UI Separator part. The props below are the ones CupertinoUI adds or changes.
Separator
| Prop | Type | Description |
|---|---|---|
orientation | "horizontal" | "vertical"Default: "horizontal" | The direction of the line. |
className | string | Extra classes, merged with the component's own. |