# Separator

A carved groove between groups, horizontal or vertical.

Docs: https://cozy-ui.solo.engineer/docs/components/separator/

Install: `npx shadcn@latest add @cozy/separator`

### Usage

```tsx
import { Separator } from "@/components/ui/separator"
```

### Example

```tsx
import { Separator } from "@/components/ui/separator";

export default function SeparatorDemo() {
  return (
    <div className="w-full max-w-sm">
      <div className="grid gap-1">
        <h4 className="m-0 text-base font-normal">Cloudvale</h4>
        <p className="m-0 text-sm text-text-muted">A village in the clouds, population 12.</p>
      </div>
      <Separator className="my-4" />
      <div className="flex h-6 items-center gap-4 text-sm">
        <span>Fields</span><Separator orientation="vertical" /><span>Barn</span><Separator orientation="vertical" /><span>Market</span>
      </div>
    </div>
  );
}
```

### Source (components/ui/separator.tsx)

```tsx
import * as React from "react";
import { Separator as SeparatorPrimitive } from "radix-ui";
import { cn } from "@/lib/utils";

function Separator({ className, orientation = "horizontal", decorative = true, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
  return <SeparatorPrimitive.Root data-slot="separator" decorative={decorative} orientation={orientation} className={cn("cz-separator", className)} {...props} />;
}

export { Separator };
```

npm: `import { Separator } from "@0xtrou/cozy-ui"` (after `npm install @0xtrou/cozy-ui` and `import "@0xtrou/cozy-ui/styles.css"`).
