Skip to content

Divider

A horizontal or vertical line for visually separating content. Supports subtle, default, and strong weights, plus a text label variant.

Preview

Horizontal variants

Subtle


Default


Strong


With text label

Or
Section Two

Vertical divider

Left content
Right content

Variants

VariantWeightUse case
subtleLightestBetween closely related items
defaultMediumStandard section separation
strongHeaviestMajor content boundaries
with-textWith label"Or" dividers, section headings
verticalVerticalSeparating inline elements

Props

PropTypeDefaultDescription
variant'subtle' | 'default' | 'strong''default'Line weight
orientation'horizontal' | 'vertical''horizontal'Line direction
labelstring--Text label shown in the middle

Code example

React

tsx
import { Divider } from '@thepace/lexicon/components';

<Divider />
<Divider variant="strong" />
<Divider label="Or" />
<Divider orientation="vertical" />

Vanilla HTML

html
<hr class="lex-divider lex-divider--default" />

<div class="lex-divider lex-divider--with-text">
  <span class="lex-divider__text">Or</span>
</div>

<div style="display: flex; align-items: stretch; height: 40px;">
  <span>Left</span>
  <div class="lex-divider lex-divider--vertical lex-divider--default"></div>
  <span>Right</span>
</div>

CSS class reference

ClassPurpose
.lex-dividerBase horizontal line
.lex-divider--subtleLightest weight
.lex-divider--defaultStandard weight
.lex-divider--strongHeavy weight
.lex-divider--verticalVertical orientation
.lex-divider--with-textLabel variant
.lex-divider__textLabel text

Accessibility

  • Horizontal dividers use <hr> for semantic separation.
  • Decorative dividers (within a visual group) use role="separator".
  • Labelled dividers associate the text with the separator for screen readers.

Guidelines

Do

  • Use dividers to separate logical sections, not every element.
  • Use the subtle variant within cards and the default variant between sections.
  • Use the text label variant for "or" patterns in auth forms.

Don't

  • Don't overuse dividers — whitespace is often sufficient.
  • Don't use strong dividers for minor separations.

Released under the MIT License. A product by the pace.