Project Settings

Manage your project preferences.

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

export function SeparatorExample() {
  return (
    <div className="w-full max-w-xs space-y-4">
      <div className="space-y-1">
        <p className="text-sm font-medium">Project Settings</p>
        <p className="text-sm text-muted-foreground">Manage your project preferences.</p>
      </div>
      <Separator />
      <div className="flex h-5 items-center gap-4 text-sm">
        <span>Profile</span>
        <Separator orientation="vertical" />
        <span>Settings</span>
        <Separator orientation="vertical" />
        <span>Help</span>
      </div>
    </div>
  );
}

Installation

Copy the source code below into your project:

import { Separator as BaseSeparator } from "@base-ui/react/separator";
import { cn } from "@registry/lib/utils";

export function Separator({ className, ...props }: BaseSeparator.Props) {
  return (
    <BaseSeparator
      className={cn(
        "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch",
        className,
      )}
      data-slot="separator"
      {...props}
    />
  );
}

API Reference

The Separator component extends the Base UI Separator props and adds the following:

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"The orientation of the separator.