Components
Separator
A visual divider that separates content horizontally or vertically, with optional Material 3 inset spacing.
Taut UI
Beautiful components built with Base UI.
BlogDocsGitHub
import { Separator } from "@/components/ui/separator";
export default function Particle() {
return (
<div className="w-72 space-y-4">
<div className="space-y-1">
<h4 className="font-medium text-sm">Taut UI</h4>
<p className="text-muted-foreground text-sm">
Beautiful components built with Base UI.
</p>
</div>
<Separator />
<div className="flex h-5 items-center gap-4 text-sm">
<span>Blog</span>
<Separator orientation="vertical" />
<span>Docs</span>
<Separator orientation="vertical" />
<span>GitHub</span>
</div>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @taut-ui/separator
Usage
import { Separator } from "@/components/ui/separator"<div className="space-y-4">
<p>Above the separator</p>
<Separator />
<p>Below the separator</p>
</div>Examples
Inset
Account
Manage your personal details
Notifications
Configure alerts and digests
Security
Manage active sessions and keys
import { Card } from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
const items = [
{ description: "Manage your personal details", title: "Account" },
{ description: "Configure alerts and digests", title: "Notifications" },
{ description: "Manage active sessions and keys", title: "Security" },
];
export default function Particle() {
return (
<Card className="w-72 py-1">
{items.map((item, index) => (
<div key={item.title}>
<div className="px-4 py-3">
<p className="font-medium text-foreground text-sm">{item.title}</p>
<p className="text-muted-foreground text-xs">{item.description}</p>
</div>
{index < items.length - 1 && <Separator inset="both" />}
</div>
))}
</Card>
);
}
Start Inset
Profile
Notifications
Privacy & Security
import { BellIcon, ShieldIcon, UserIcon } from "lucide-react";
import { Card } from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
const items = [
{ icon: UserIcon, label: "Profile" },
{ icon: BellIcon, label: "Notifications" },
{ icon: ShieldIcon, label: "Privacy & Security" },
];
export default function Particle() {
return (
<Card className="w-72 py-1">
{items.map((item, index) => (
<div key={item.label}>
<div className="flex items-center gap-3 px-4 py-3 text-foreground text-sm">
<item.icon className="size-4 shrink-0 text-muted-foreground" />
<span>{item.label}</span>
</div>
{index < items.length - 1 && <Separator inset="start" />}
</div>
))}
</Card>
);
}
API Reference
Separator
Wraps Base UI Separator with horizontal/vertical orientation and optional inset margins.
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | Axis of the divider line |
inset | "both" | "start" | "end" | - | Insets the divider from both ends, the leading end, or trailing end |
className | string | - | Additional CSS classes |
...props | Base UI Separator props | - | All standard separator attributes are supported |