base-separator

PreviousNext
Docs
reuiui

Preview

Loading preview…
registry/default/ui/base-separator.tsx
'use client';

import * as React from 'react';
import { cn } from '@/registry/default/lib/utils';
import { Separator as SeparatorPrimitive } from '@base-ui-components/react/separator';

function Separator({
  className,
  orientation = 'horizontal',
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive>) {
  return (
    <SeparatorPrimitive
      data-slot="separator"
      orientation={orientation}
      className={cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px', className)}
      {...props}
    />
  );
}

export { Separator };

Installation

npx shadcn@latest add @reui/base-separator

Usage

import { BaseSeparator } from "@/components/ui/base-separator"
<BaseSeparator />