Separator

A 1px --mrd-line hairline that divides content. Reach for spacing or a surface change first; use a separator when neither is enough.

StableSource

Account

Profile, email and password.

Import

tsx
import { Separator } from "@merid/react";

Examples

Vertical

orientation="vertical" draws a vertical line that stretches to its flex container's height.

Docs
Changelog
GitHub

Semantic separator

By default the line is decorative (role="none"). Set decorative={false} when it divides meaningful groups, so it is exposed as role="separator".

Recent files

Shared with you

API reference

Renders a div; forwards its ref and passes native attributes through.

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Direction of the hairline.
decorativebooleantrueWhen true the line is purely visual (role="none"). Set false to expose role="separator".

Styling

HookValues
.mrd-separatorRoot <div>
data-orientationhorizontal · vertical

Separator has no component variables; its colour is --mrd-line. Add spacing with margin on the separator or gap on the parent.

Accessibility

  • Decorative separators are removed from the accessibility tree.
  • With decorative={false}, the element has role="separator", and vertical separators also get aria-orientation="vertical".

Guidelines

Do

Separate groups with whitespace or a tray surface first, and keep separators for dense lists and toolbars.

Avoid

Stack separators between every paragraph or make them thicker or darker than 1px --mrd-line.

  • Stack — gap-based spacing, often a better divider.
  • Section — separates page bands by surface.