Component
The Separator component visually divides content using horizontal or vertical lines, creating clear distinctions between different sections and improving visual organization.
View component changelogpreview
Modern
Accessible
Performant
- Support for both horizontal and vertical orientation
- Customizable with different color themes
- Uses semantic separator roles by default
- Can opt into decorative presentation when the divider is visual-only
- Helps establish visual hierarchy in layouts
- Simple integration with minimal props required
- Lightweight implementation with proper spacing
A component that visually separates content with a horizontal or vertical line, providing visual hierarchy and improved content organization.
| Prop | Type | Default |
|---|---|---|
orientation | enum | 'horizontal' |
className | string | '' |
customRootClass | string | '' |
color | string | '' |
decorative | boolean | false |
| Shortcut | Description |
|---|---|
None | Separators are static by default and do not add component-specific keyboard shortcuts. |
| Reference | What Rad UI follows |
|---|---|
Uses role="separator" for semantic dividers, adds aria-orientation="vertical" when needed, and switches to role="none" when decorative is true. |