Controls

Separator

Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Separator

Pixel UI

Small parts, carefully made.

or
Docs
Primitives
Blog

Separator

A hairline that draws itself in, with an optional label in the middle.

Installation

npx shadcn@latest add ikislay/pixel-ui/separator

How to use

import { Separator } from "@/components/ui/separator"
export function Demo() {
return (
<div className="flex h-5 items-center gap-3">
Docs <Separator orientation="vertical" /> Blog
</div>
)
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
orientation
horizontalvertical

Across the full width, or down the full height of its row.

decorative
boolean

Turn it off when the line marks a real break, so it is announced as a separator.

label
ReactNode

Text shown in a gap in the middle of the line.

className
string

Merged onto the root element.