Separator

A rule between two things. Decorative by default, so it is drawn but not announced: a line that exists only to make a group readable has nothing to say to a screen reader.

Reach for it

A rule between groups that already read as groups.

Not for

Substituting for spacing. Rules between every row make a table.

Horizontal and vertical

Vertical needs a height from its container, which is why it usually sits inside a row with a set height. Reach for spacing before a rule: a separator between every item turns a list into a grid nobody asked for.

Above

Below

Left

Right

API reference

Separator

PropTypeDefaultDescription
data-testidstring-Names the element for a test. Never rendered, never announced.
orientation'horizontal' | 'vertical'-