Skip to content
Ringobook v3.27.0

Dividers

A divider is a thin line used to group or separate content within a layout, both horizontally and vertically. It helps to create a clear visual hierarchy and structure. ↔️

Use the .ro-divider class on an <hr> element to create a horizontal line. By default, it has no vertical margin.

<p>Content above</p>
<hr class="ro-divider" />
<p>Content below</p>
Preview

Content above


Content below

Add vertical spacing around a horizontal divider using .ro-margin-* classes (or data-ro-margin). The values range from 1 to 4.

<p>Content above</p>
<hr class="ro-divider ro-margin-4" />
<p>Content below</p>
Preview

Content above


Content below

To create a vertical line, add the .ro-dir-vertical class (or data-ro-dir="vertical"). Vertical dividers are best used within a flex container to separate items horizontally.

<div class="ro-stack ro-items-center">
<span>Left</span>
<hr class="ro-divider ro-dir-vertical" />
<span>Right</span>
</div>
Preview
Left
Right

You can also apply horizontal margins to a vertical divider using .ro-margin-*.

<div class="ro-stack ro-items-center">
<span>Left</span>
<hr class="ro-divider ro-dir-vertical ro-margin-3" />
<span>Right</span>
</div>
Preview
Left
Right

Divider styles are controlled via utility classes.

ClassDescription
.ro-dividerHorizontal or vertical divider line.
.ro-dir-vertical, [data-ro-dir="vertical"]Vertical orientation.
.ro-margin-*, [data-ro-margin]Margin around the divider (14).
--ro-divider-colorDivider line color.
--ro-divider-marginDefault margin token.

Note: Data attributes data-ro-dir and data-ro-margin are also supported but CSS classes are preferred.

Changelog

Recent updates in @ringover/styles. See the full package changelog .

@ringover/styles@3.3.0
  • Updated divider styles and spacing.