Divider
Usage
Use a divider to separate groups that spacing alone can't separate: the totals row of a parts list, two groups of toolbar actions, alternative sign-in methods. Prefer whitespace first — every line adds visual noise to dense dispatcher screens.
- Horizontal —
<hr>for a thematic break in content (it is announced as a separator). - Vertical — between inline groups (toolbar sections, metadata items).
- With label — a short word that explains the break ("or", "Earlier"). One or two words, sentence case.
Anatomy
- Line — 1px
--color-border-default(.divider--strongfor 3:1) - Label (optional) — centered text between two lines,
.divider-label
Examples
Divider
Front brake pads (set) · 2 × €48.00
Parts total · €96.00
Van KX-219
84,210 km
Bay 4
or
<hr class="divider">
<span class="divider divider--vertical" role="separator" aria-orientation="vertical"></span>
<!-- Labelled: the text is read as normal text, the lines are decoration -->
<div class="divider-label"><span>or</span></div>
API
| Hook | Values | Purpose |
|---|---|---|
hr.divider | block class | Horizontal semantic separator |
.divider--vertical + role="separator" aria-orientation="vertical" | modifier + ARIA | Vertical separator in a row |
.divider--strong | modifier class | 3:1 line when the line itself must be perceived |
.divider-label | block class | Labelled break |
aria-hidden="true" | attribute | Purely decorative divider that shouldn't be announced |
Do and don't
Labour · 1.5 h
Total · €171.00
Plate
Make
Model
Accessibility
<hr>has the implicitseparatorrole; screen readers announce it. Addaria-hidden="true"when the break is purely visual.- Vertical separators need
role="separator"andaria-orientation="vertical". Inside a toolbar they group controls for assistive tech. - The labelled divider isn't a separator role (separator children are hidden from the accessibility tree); its word is read as normal text.
- Decorative lines are 1px
border.default; lines in forced colors useCanvasText. - Not focusable, no keyboard interaction. (Resizable separators are the splitter component.)
Tokens
| Custom property | Purpose |
|---|---|
--border-width-thin | Line weight |
--color-border-default | -strong | Line color |
--color-text-muted, --typography-small-* | Label text |
--space-3 | -6 | Label gap; minimum vertical length |