Data display
Separator
Divide related groups of content, either across a row or between inline items.
Purpose
A separator is decorative. If the groups it divides need names, give them headings — a rule alone carries no meaning for a screen reader.
Example
Entitlements
Outpatient, dental and optical cover.
Dependants
Spouse and two children enrolled.
ClaimsEntitlementsClinics
Structure
| Property | Value |
|---|---|
| Thickness | 1px (h-px horizontal · w-px vertical) |
| Colour | --border |
| Orientation | horizontal (default) fills the row; vertical fills the container's height |
Best practices
Do
- Reach for whitespace first — a rule is for groups that spacing alone cannot keep apart.
- Give a vertical separator a sized container (
h-5in the example above); it has no height of its own.
Don't
- Rule between every element — dividers multiply visual noise faster than they add order.
- Use a separator to name a group; if the groups need names, give them headings.
Accessibility & keyboard
- Decorative by default (
decorativeis pre-set), so it is removed from the accessibility tree — a rule alone carries no meaning for a screen reader. - Pass
decorative={false}only when the separation is semantic; Radix then rendersrole="separator"with the rightaria-orientation. - Keyboard: none — a separator never receives focus.
Props
Separator is a styled Radix passthrough with no props of its own beyond orientation,
decorative and className. See the Storybook
prop table for the generated API.