components/separator.tsx

nimara-ecommerce · packages/ui/src/components/separator.tsx · typescript · BSD-3-Clause
ui

Accessible separator component for layouts and forms using Radix UI primitives.

// Source: https://github.com/mirumee/nimara-ecommerce | License: BSD-3-Clause | Copyright 2024, Mirumee Labs
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

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

import { cn } from "../lib/utils";

const Separator = React.forwardRef<
  React.ElementRef<typeof SeparatorPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(
  (
    { className, orientation = "horizontal", decorative = true, ...props },
    ref,
  ) => (
    <SeparatorPrimitive.Root
      ref={ref}
      decorative={decorative}
      orientation={orientation}
      className={cn(
        "bg-border shrink-0",
        orientation === "horizontal" ? "h-[1px] w-full" : "h-ful

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

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

Get a free API key