Skip to content
Alpha

Hololink UI is under active development. Components, APIs and these docs may change without notice.

Holo Divider

The <holo-divider> component renders a native <hr> in shadow DOM, which gets the separator role implicitly. Use the orientation prop to switch between a horizontal rule and a vertical divider for use inside flex layouts.

Use it for:

  • Separating distinct groups of content with a visible rule, horizontally between sections or vertically between inline items.

Don’t use it for:

  • Spacing alone. Use gap in Stack or Grid.
  • Dividing table rows or list items. Style those with their own borders.
  • Page structure for assistive technology. Use headings and landmarks.

Section one

Section two

<p>Section one</p>
<holo-divider></holo-divider>
<p>Section two</p>
LeftRight
<holo-divider orientation="vertical"></holo-divider>

The divider is non-interactive. It renders a native <hr> with aria-orientation set to horizontal or vertical, so it is exposed as a separator. The line colour is decorative (below 3:1 by design), so never rely on it as the only cue between groups.

You provide:

  • Real headings or landmarks for structure. A separator does not name or label the sections it divides.
  • Restraint. Screen readers can announce each separator, so avoid many in a row.

Importing

import '@philbob-sideprojects/hololink-ui/holo-divider';

Properties

PropertyAttributeTypeDefaultDescription
orientationorientation"horizontal" | "vertical"'horizontal'The axis along which the divider renders.

CSS custom properties

PropertyDescription
--holo-divider-colorColor of the rule.
--holo-divider-thicknessThickness of the rule.