UIPackage

Separator

React layout
Edit on GitHub

Horizontal or vertical visual divider — a `<div>` with the right ARIA role and a registry-token border color. Use between sections, list rows, and toolbar groups.

Also available for Vue ->

Installation

$ npx shadcn@latest add https://react.uipkge.dev/r/react/separator.json

Or with the named registry: npx shadcn@latest add @uipkge-react/separator

Examples

Dependencies

Used by

Files (2)

  • components/ui/separator/Separator.tsx 0.8 kB
    'use client'
    
    import * as React from 'react'
    import * as SeparatorPrimitive from '@radix-ui/react-separator'
    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}
        data-uipkge=""
        data-slot="separator"
        orientation={orientation}
        decorative={decorative}
        className={cn(
          'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
          className,
        )}
        {...props}
      />
    ))
    Separator.displayName = 'Separator'
    
    export { Separator }
  • components/ui/separator/index.ts 0 kB
    export { Separator } from './Separator'

Raw manifest: https://react.uipkge.dev/r/react/separator.json