separator

PreviousNext
Docs
takiui

Preview

Loading preview…
registry/new-york/ui/separator.tsx
"use client"

import * as React from "react"
import {
  Separator as RACSeparator,
  type SeparatorProps,
} from "react-aria-components"

import { cn } from "@/lib/utils"

export function Separator(props: SeparatorProps) {
  const { orientation = "horizontal", className, ...rest } = props

  return (
    <RACSeparator
      data-slot="separator"
      orientation={orientation}
      className={cn(
        "bg-border shrink-0",
        orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
        className
      )}
      {...rest}
    />
  )
}

Separator.displayName = "Separator"

Installation

npx shadcn@latest add @taki/separator

Usage

import { Separator } from "@/components/ui/separator"
<Separator />