Separator

Visual divider between content sections.

Report a bug

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Installation

pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/separator.json

Storybook

Explore all variants, controls, and accessibility checks in the interactive Storybook playground.

View in Storybook

Code

"use client"; import { forwardRef } from "react"; import * as SeparatorPrimitive from "@radix-ui/react-separator"; import { cn } from "../../lib/utils"; const Separator = forwardRef< React.ComponentRef<typeof SeparatorPrimitive.Root>, React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> >( ( { className, decorative = true, orientation = "horizontal", ...props }, ref, ) => ( <SeparatorPrimitive.Root className={cn( "shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className, )} decorative={decorative} orientation={orientation} ref={ref} {...props} /> ), ); Separator.displayName = SeparatorPrimitive.Root.displayName; export { Separator };

Dependencies

  • @vllnt/ui@^0.2.1