Appica UIUI 1.0.0

Separator

A thin horizontal or vertical line that separates content.

Above the lineBelow the line

Usage

Separator draws a single line between sections of related content. It's horizontal by default — a full-width rule — and becomes a vertical divider with orientation="vertical", stretching to the height of its flex parent. The variant prop swaps the line style, from a plain solid rule to decorative wave and zigzag patterns.

It renders with role="separator" so assistive tech announces the boundary. When a separator is purely cosmetic (the gradient, wave, zigzag, and dotted patterns are drawn as decoration), pass nothing else — the component already keeps it out of the way of screen readers where appropriate.

Examples

Variants

Seven line styles cover everything from a crisp hairline to playful decorative patterns. solid, dashed, dotted, double, and gradient are CSS borders; wave and zigzag are drawn as a repeating SVG path that scales with the available width.

Colors

The line is drawn with currentColor, so its color follows the current text color — set any text-* utility on the separator (or an ancestor) to recolor it. The default is the low-emphasis text-border token; reach for the stronger text-border-strong / text-border-intense shades for more contrast, or a semantic color like text-primary, text-success, or text-error to tie the divider to its surrounding state.

Vertical orientation

Set orientation="vertical" to divide inline items like toolbar actions or breadcrumb-style links. The separator stretches to match its flex row, so give the row a height (or let its content define one).

In context

Separators work in both directions within the same block — a horizontal rule between stacked sections, and vertical rules between inline stats.

RTL

Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior follows the same direction.

A horizontal separator looks the same in either direction, but the items it sits between reorder to follow the resolved direction, so vertical dividers land in the right place automatically. For setup details and caveats, see the RTL guide.

الملف الشخصيالإعداداتتسجيل الخروج

API reference

Separator wraps Base UI's Separator and forwards ref and every remaining <div> attribute. It exposes data-orientation (horizontal / vertical) for styling.

Accessibility

  • Renders with role="separator" and an aria-orientation matching the orientation prop, so assistive tech announces the boundary between groups.
  • Pick a color with enough contrast against its background for the divider to stay perceivable — see Colors. The default text-border token is intentionally low-emphasis.
  • A separator is non-interactive and is skipped by keyboard navigation.

© 2026 Appica UI. A free component library, crafted by the Appica team.