primitives/separator.tsx

relivator · src/ui/primitives/separator.tsx · typescript · MIT
ui

Radix UI separator component for layout and styling.

// Source: https://github.com/reliverse/relivator | License: MIT | Copyright 2025 Nazar Kornienko (blefnk), Reliverse
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

import type * as React from "react";

import * as SeparatorPrimitive from "@radix-ui/react-separator";

import { cn } from "~/lib/cn";

function Separator({
  className,
  decorative = true,
  orientation = "horizontal",
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
  return (
    <SeparatorPrimitive.Root
      className={cn(
        `
          shrink-0 bg-border
          data-[orientation=horizontal]:h-px
          data-[orientation=horizontal]:w-full
          data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px
        `,
        className,
      )}
  

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key