Skip to main content

Overview

Separator is used to visually or semantically separate content. It renders a semantic separator role by default.

Features

  • Supports horizontal and vertical orientations
  • Can be purely decorative or semantic

Installation

Anatomy

API Reference

Root

The separator component.
'horizontal' | 'vertical'
default:"'horizontal'"
The orientation of the separator.
boolean
When true, indicates the separator is purely visual and does not convey semantic meaning. This will set role="none" and remove it from the accessibility tree.

Examples

Horizontal

Vertical

Decorative

Data Attributes

Root

  • data-orientation - "horizontal" or "vertical"

Accessibility

By default, Separator has role="separator" which means it will be announced by screen readers. If the separator is purely decorative, use the decorative prop to remove it from the accessibility tree.