Divider â Vanilla
Divider with vanilla HTML. Ensure Rizzo CSS is loaded.
Divider component
A simple divider for visually separating content. Supports horizontal (default) and vertical orientation, and an optional label (e.g. "OR") in the middle for horizontal dividers.
Add this component
The command below includes <strong>Divider</strong>ârun it in your project directory to install this component (and the CSS if needed). No prompts.
Choose your package manager â click a tab to select, then copy the command.
BEM / attributes
divider,divider--horizontal(default),divider--verticaldivider--labeledâ when showing a label; usedivider__line,divider__labelrole="separator",aria-orientation="horizontal"orvertical;aria-labelwhen labeled
Basic usage (horizontal)
Content above
Content below
With label
Use a labeled divider to show text in the middle (e.g. "OR" between two options).
Vertical
Use divider--vertical inside a flex row to separate items. The parent should have a defined height (e.g. min-height or height).
Features
- Accessible â
role="separator"andaria-orientation; optionalaria-labelwhen label is set - Horizontal â Full-width line; optional label in the center
- Vertical â Full-height line for use in flex layouts
- Theme-aware â Uses
--borderand--text-dim
HTML
<div class="divider divider--horizontal" role="separator" aria-orientation="horizontal">
<span class="divider__line" aria-hidden="true"></span>
</div>
<div class="divider divider--horizontal divider--labeled" role="separator" aria-orientation="horizontal" aria-label="OR">
<span class="divider__line" aria-hidden="true"></span>
<span class="divider__label">OR</span>
<span class="divider__line" aria-hidden="true"></span>
</div>
<!-- Vertical (inside flex with min-height): -->
<div style="display: flex; align-items: center; gap: var(--spacing-3); min-height: 3rem;">
<span>Item 1</span>
<div class="divider divider--vertical" role="separator" aria-orientation="vertical"><span class="divider__line" aria-hidden="true"></span></div>
<span>Item 2</span>
<div class="divider divider--vertical" role="separator" aria-orientation="vertical"><span class="divider__line" aria-hidden="true"></span></div>
<span>Item 3</span>
</div>