Skip to content
Storybook

Divider

Separates content groups. Optional centered or start label.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.


Usage

  • Prefer spacing first; add a divider when groups still blur.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

API reference

Class / attributeTypeDescription
px-dividerclass<hr> or a div with role="separator" and a label.
px-divider--start · --verticalclassLabel at start / vertical.

Figma properties

Divider4 variants · page “Data display”Open

Separates content groups. Label=Start places text at the inline start (right in RTL). Use <hr> or role=separator.

PropertyTypeValues
Label textText“OR”
OrientationVariantHorizontal Vertical
LabelVariantNone Center Start

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-divider-colorcolor-border-neutral-subtle#f2f4f7

Accessibility

  • Decorative dividers can be <hr aria-hidden="true">.