Separator

A thin divider between sections. Horizontal by default, optionally vertical.

Separator is a visual rule that groups related elements while preserving the surrounding flow. It wraps Radix’s SeparatorPrimitive.Root, which renders an HTML <div> with the correct ARIA semantics for the chosen mode.

Reach for Separator when whitespace alone is not enough — for example between two columns in a card footer, between the header and body of a settings panel, or between groups of navigation items. If the sections already sit in distinct containers (different cards, different tabs), whitespace is usually enough and Separator just adds noise.

Import

import { Separator } from "@unkey/ui";

Horizontal

The default orientation. Renders as a 1px full-width rule. The parent container controls width.

Workspace
ACME, Inc.
Plan
Pro

Vertical

For vertical dividers, set orientation="vertical". The parent must give the separator a height — either explicitly (h-6) or implicitly via its flex/grid context — otherwise the rule collapses.

Drafts
Published
Archived

Accessibility

Separator defaults to decorative={true}, which means screen readers skip it entirely — appropriate when the rule is purely visual and the surrounding semantic structure (headings, landmarks, lists) already conveys the grouping.

Set decorative={false} when the rule is the only thing that distinguishes sections that would otherwise read as one block. Radix then renders it with role="separator" and the appropriate aria-orientation, so screen readers announce the boundary.

Billing
Invoices, usage, and payment methods.

Props

orientation "horizontal" | "vertical" Optional Default "horizontal"

Axis of the rule. Vertical separators require the parent (or a className) to set a height.

decorative boolean Optional Default true

When true, the separator is hidden from assistive technology (no role). When false, Radix emits role="separator" with aria-orientation. Default to true unless the rule is the only structural cue.

className string Optional

Additional Tailwind classes. Typically used to set vertical height (h-4, h-6) or override spacing (my-4).