Noctis

Separator

A hairline divider. A Separator draws a neutral border line between regions or items — horizontal across the flow, vertical between items in a row — and Base UI gives it the separator role so the division is announced without any extra wiring.

Orientation

orientation picks the axis: horizontal (the default) draws a full-width rule across the inline flow, while vertical draws a full-height line that divides items in a row. A vertical separator stretches to its row's height on its own — no need to give the row an explicit height.

Profile
Workspace
Edit
Share
Delete

Decorative vs semantic

By default a Separator is semantic — it carries the separator role, so a screen reader announces the division. When the line is purely visual and the regions it splits already read as distinct — the groups in a toolbar, sections that each carry their own landmark — set decorative to drop it to role="none" so assistive tech skips it. The paint is identical; only the role changes.

In a list

A separator is most at home between the peer rows of a list or settings panel. The line spans its container edge to edge by default; pull it off both ends — so it stops short of a row's padding — by setting the --noctis-separator-margin seam. It applies as a logical margin, so the inset mirrors under RTL.

NotificationsAll activity
PrivacyOnly me
LanguageEnglish

In a row of metadata

Vertical separators thread through an inline run of metadata — a byline, a breadcrumb of facts — keeping the items distinct without bullets. Here the rules are decorative (the text items are already separate to a screen reader) and each stretches to the line's height automatically.

Jane Doe
5 min read
Edited 2h ago

On a surface

The hairline fills from the neutral border role, which the engine re-points inside every elevation scope. So a Separator dropped into a Surface — or any data-elevation subtree — re-tones to read correctly against that surface, with no props: lighter as the surface lifts, settling back in a sunken well.

BaseSettings
ElevatedSettings
MenuSettings
SunkenSettings

Accessibility

A separator is inert: it is not focusable and has no keyboard interaction — it conveys structure, not behaviour. A semantic separator is announced with its orientation; a decorative one is skipped entirely.

KeyAction
TabSkips the separator — it is never a focus stop.

A draggable divider that resizes the regions on either side is a different control (the window splitter pattern, with its own focus and value semantics), not this component.

Anatomy

Separator is a single element — no compound subparts. It renders a <div> with the separator role (or role="none" when decorative); the hairline is a filled box (a background-color plus a 1px cross-axis size), so the same element draws both orientations.

  • Separator — the divider line. Props: orientation (horizontal default, or vertical) and decorative (false default), plus the native attributes of the rendered element.
  • Separator.props(...) — the D12 escape hatch: a spreadable data-slot + data-orientation bag for styling a foreign element as a separator in place.

The rendered element carries data-slot="noctis-separator" for styling and testing, and data-orientation (which Base UI stamps) that the cross-axis size keys off.

Design tokens

Generated from the component's declaration — the same graph that mints the CSS, so a variable name or its resolution default can't drift. Retune the line by overriding the --noctis-separator-* seam on an ancestor — e.g. .muted { --noctis-separator-background-color: var(--noctis-color-faint); } lightens every divider in that region. See Customization for the full override ladder and Tokens for the whole graph.

Token

API reference

Generated from the component's types — every prop, type, default, and description comes straight from the source; the separator also passes through the native attributes of its rendered element. Expand a row for the full type and description.

Prop

AttributeDescription
data-slotThe catalog slot the precompiled `separator.css` keys every rule off.
data-orientationThe line's orientation — `horizontal` (default) | `vertical`; Base UI stamps it, and the CSS keys the cross-axis size off it.