Skip to content

Divider ​

A thin line between groups of content, optionally with a short label in the middle.

Open in Storybook to try every prop.

When to use ​

Use a Divider forUse instead
Separating groups inside a Card, panel or menuSeparating whole sections of a page (use Cards, or spacing)
"or" between two alternative actionsA border that's part of a component (Card, Header, Slideover draw their own)
Vertical: between groups of toolbar buttons

Properties ​

PropertyTypeDefaultDescription
orientationhorizontal | verticalhorizontalVertical stretches to the row's height.
labelstring—Short text in the middle (horizontal only). Slot default for richer content.
decorativebooleantrueHidden from screen readers. False: announced as a separator.

Sizes ​

PartValue
Line1px, black 15% (the same as every border)
LengthFull width (horizontal) or full height of the row (vertical)
Label12px / 16px, black 65%, 12px gap to the lines either side
Spacing aroundNone built in: use the parent's gap, or margins (e.g. mx-1 my-2 in a toolbar)

Accessibility ​

CaseAnnounced as
Decorative (default)Nothing (role="none" / presentation)
decorative="false"separator, with aria-orientation (and the label as its name)

Platform adaptation ​

PlatformImplementationDifferences
Web / desktop (Vue)Divider.vue (Reka UI Separator)—
iOS (SwiftUI)—Divider()
Android (Compose)—HorizontalDivider / VerticalDivider

Tokens used ​

TokenUsed for
color black (15%)line
color black (65%)label

Do / Don't ​

DoDon't
Use spacing first; add a Divider when spacing alone doesn't separate enoughPut a Divider between every item in a list
Keep labels to a word or two ("or", "Older")Use a Divider as a heading

Released under the PolyForm Noncommercial License 1.0.0.