Skip to main content

Overview

Section A
Section B
Item 1
Item 2
Item 3
Separator renders a thin <hr> or <div> line to visually separate content sections. It can be horizontal (default) or vertical, and decorative (hidden from screen readers) or semantic.

Installation


Usage


Variants

Horizontal (Default)

Typography
A collection of font styles used across the design system.
Spacing
Base-4 spacing scale from 4px to 96px.

Vertical

Blog
Docs
Source

With Label (“OR” divider)

OR

API Reference

string
default:"horizontal"
Direction of the line. Values: horizontal · vertical
boolean
default:"true"
When true, the separator is hidden from screen readers (aria-hidden="true"). Set to false when the separator has semantic meaning (e.g. separating distinct content sections).
string
Additional class names for custom color, thickness, or spacing.

Accessibility

  • Decorative separators (decorative={true}) render with aria-hidden="true" — screen readers skip them
  • Semantic separators (decorative={false}) render as <hr role="separator"> — screen readers announce the division
  • Vertical separators inside flex containers must have an explicit height set via className or style

Do’s & Don’ts

Do

  • Use orientation="vertical" inside flex rows (nav links, breadcrumbs, toolbars)
  • Use decorative={false} when separating distinct, non-obvious content sections
  • Combine with a label (“OR”, “AND”) for auth flows or filter sections
  • Use consistent spacing (my-4 or my-6) above and below separators

Don't

  • Don’t overuse separators — too many creates visual noise
  • Don’t use Separator as a border replacement for cards or panels
  • Don’t forget to set height for vertical separators — they won’t show without it
  • Don’t use a <hr> directly — use this component to ensure correct ARIA attributes