Skip to main content

Separator

The Separator component provides a visual and semantic divider between sections of content. It’s accessible to screen readers and supports both horizontal and vertical orientations.

Import

Basic Usage

Key Features

  • Accessible: Uses the ARIA separator role for screen readers
  • Flexible orientation: Supports horizontal and vertical layouts
  • Semantic HTML: Properly announces content divisions to assistive technologies
  • Unstyled: Complete control over visual appearance

Component Props

Separator

A semantic separator element. Props:
  • orientation (string): The orientation of the separator. Either ‘horizontal’ or ‘vertical’ (default: ‘horizontal’)
  • Renders a <div> element with role=“separator”
  • Accepts all standard HTML div attributes
State:
  • orientation: The current orientation of the separator

Styling

Common Patterns

Horizontal Separator

The default orientation:

Vertical Separator

Useful for dividing content side-by-side:

Styled Separator

With Text Label

In Navigation

In Lists

Decorative Separator

Toolbar Separator