Divider is a UI element that structures content by visually separating different areas.

On this page


Component design version:

  • Divider v1.0.0

Note

Design guidelines

For usage guidance, please refer to the divider design guidelines.

Divider is a UI element that structures content by visually separating different areas.

The divider enhances readability and organises content without creating a stronger visual hierarchy, such as a heading or container.

Horizontal rules

Horizontal rules should use the <hr /> tag, when the separator has semantic meaning (i.e., when it represents a topic change or a significant transition in the content). If the divider is purely decorative, prefer using a border CSS property on an HTML element or our border utilities, or even ensure to hide it from assistive technologies (e.g., aria-hidden="true").


<hr />

<div class="border-top border-default my-medium"></div>
html

Vertical rules

Vertical rules are inspired by the <hr /> element. The vr class allows you to create vertical dividers in common layouts. They’re styled just like <hr /> elements. They have min-height of 1em.

<div class="vr"></div>
html

Vertical rules scale their height in flex layouts:

<div class="d-flex" style="height: 50px;">
  <div class="vr"></div>
</div>

<div class="d-flex" style="height: 80px;">
  <div class="vr"></div>
</div>

<div class="d-flex" style="height: 100px;">
  <div class="vr"></div>
</div>
html

Color

Change the divider color using the border color utilities.

















<hr class="border-brand-primary" />

<hr class="border-default" />

<hr class="border-emphasized" />

<hr class="border-minimal" />

<hr class="border-muted" />

<div class="bg-brand-primary py-2xsmall"><hr class="border-on-brand-primary"></div>

<hr class="border-status-accent" />

<hr class="border-status-info" />

<hr class="border-status-negative" />

<hr class="border-status-positive" />

<hr class="border-status-warning" />

<div class="bg-always-white py-2xsmall"><hr class="border-always-black"></div>

<div class="bg-always-black py-2xsmall"><hr class="border-always-white"></div>

<div class="bg-always-black py-2xsmall"><hr class="border-always-on-black"></div>

<div class="bg-always-white py-2xsmall"><hr class="border-always-on-white"></div>
html

<div class="vr border-brand-primary"></div>

<div class="vr border-default"></div>

<div class="vr border-emphasized"></div>

<div class="vr border-minimal"></div>

<div class="vr border-muted"></div>

<div class="bg-brand-primary py-2xsmall"><div class="vr border-on-brand-primary"></div></div>

<div class="vr border-status-accent"></div>

<div class="vr border-status-info"></div>

<div class="vr border-status-negative"></div>

<div class="vr border-status-positive"></div>

<div class="vr border-status-warning"></div>

<div class="bg-always-white py-2xsmall"><div class="vr border-always-black"></div></div>

<div class="bg-always-black py-2xsmall"><div class="vr border-always-white"></div></div>

<div class="bg-always-black py-2xsmall"><div class="vr border-always-on-black"></div></div>

<div class="bg-always-white py-2xsmall"><div class="vr border-always-on-white"></div></div>
html
Bootstrap $enable-bootstrap-compatibility: true

Note

This part is enabled only when $enable-bootstrap-compatibility is set to true.

Read more about Bootstrap compatibility

The <hr /> and .vr color can be set using colors utilities


<hr class="text-muted">

<div class="vr text-brand-primary"></div>
html

Size

Change the divider thickness using the border width utilities.





<div>

  <hr class="border-thin">

  <hr class="border-medium">

  <hr class="border-thick">

  <hr class="border-thicker">

</div>
html
<div class="d-flex" style="height: 50px;">

  <div class="vr border-thin"></div>

  <div class="vr border-medium"></div>

  <div class="vr border-thick"></div>

  <div class="vr border-thicker"></div>

</div>
html