Command Palette
Search for a command to run...
Separator
A visual divider between content with horizontal or vertical orientation.
Radix Primitives
An open-source UI component library.
Blog
Docs
Source
A separator component built on top of Radix UI Separator.
Installation
npx shadcn@latest add separator
Usage
import { Separator } from "@/components/ui/separator"
<Separator />
Examples
Horizontal
Use the default horizontal orientation to create a separator between content.
<div><div className="space-y-1"> <h4 className="text-sm font-medium leading-none">Radix Primitives</h4> <p className="text-sm text-muted-foreground"> An open-source UI component library. </p></div><Separator className="my-4" /><div className="space-y-1"> <h4 className="text-sm font-medium leading-none">Shadcn UI</h4> <p className="text-sm text-muted-foreground"> Beautifully designed components built with Radix UI and Tailwind CSS. </p></div></div>
Vertical
Use the vertical orientation to create a separator between content.
<div className="flex h-5 items-center space-x-4 text-sm"><div>Blog</div><Separator orientation="vertical" /><div>Docs</div><Separator orientation="vertical" /><div>Source</div></div>
Soft
Use the soft
prop to create a more subtle separator.
<Separator soft />
Props
Separator
| Prop | Type | Default | Description |
| :-- | :-- | :-- | :-- |
| orientation
| "horizontal" \| "vertical"
| "horizontal"
| The orientation of the separator. |
| decorative
| boolean
| true
| Whether the separator is purely decorative or semantically separates content. |
| soft
| boolean
| false
| Whether to use a softer color for the separator. |