Separator

A hairline of ink at 8% between groups: across the page, or upright between inline items. Built on the vendored Base UI separator.

Playground

Anna Kováčová

Senior stylist

Mon–Fri 09:00–17:00

Separator

Horizontal

The default. It spans its container, so spacing belongs to the parent or to a margin on the separator.

Haircut & beard

45 min · €32.00

Beard trim

20 min · €15.00

Vertical

Upright between inline items. It stretches to the row, so give the row a height, or give the separator one (h-5) in a row that centres its items.

Tuesday 13 October6 bookings2 free slots

Decorative

A separator is announced to screen readers, which is right when it divides sections of content. When it only draws a line between things that are already distinct, like the dashboard's mobile header, make it decorative.

Salón Luna

API reference

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Across its container, or upright between inline items. Sets aria-orientation.
decorativebooleanfalseHidden from assistive tech, for a line that separates nothing a screen reader needs to know about.
classNamestring—Layout only: margins, or a height for a vertical one. Never recolour it.

Everything else passes through to the Base UI separator (render, style, …).

Guidelines

  • Reach for space first. A separator earns its place only where space alone doesn't make the grouping clear, as in a dense list or an inline row of facts.
  • One weight: an ink hairline at 8%. No thicker rules, no colours, no dashes. Emphasis belongs to type, not to lines.
  • Don't stack a separator against a card edge or a table row border. Two lines side by side read as one heavy line.