Separator
Visually or semantically separates content.
Radix Primitives
An open-source UI component library.
Blog
Docs
Source
Installation
Follow the Quickstart guide if you haven't already.
Install the following dependencies:
pnpm add @radix-ui/react-separator
Copy and paste the following code into your project.
import * as SeparatorPrimitive from "@radix-ui/react-separator";
import { cn } from "~/utils/tailwind";
function Separator({
  className,
  orientation = "horizontal",
  decorative = true,
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
  return (
    <SeparatorPrimitive.Root
      decorative={decorative}
      orientation={orientation}
      className={cn(
        "shrink-0 bg-border",
        orientation= "horizontal" ? "h-0.25 w-full" : "h-full w-0.25",
        className,
      )}
      {...props}
    />
  );
}
export { Separator };
Update the import paths to match your project setup.
Usage
import { Separator } from "~/components/ui/Separator";<Separator />