v0.5.1

Divider

Visual separator between content sections, horizontal or vertical with an optional label.

Installation

npx paubha@latest add divider

Usage

import { Divider } from "@/components/ui/divider";

<Divider />
<Divider label="OR" />

Examples

With a label

Vertical

LeftRight

API reference

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Line direction.
labelReactNode—Optional label rendered between two line segments.

Accessibility

Accessibility

  • Role. role="separator", with aria-orientation set for vertical dividers.

  • Non-interactive. A structural separator (not an interactive/resizable one) correctly has no tabIndex and no focus state. For a purely decorative line, pass aria-hidden.