<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Divider

A horizontal divider to segment content.

Use Divider...

  • To vertically separate linear content into sections clearly when clarity and distinction between elements are needed.

Don't use Divider...

  • If it creates visual clutter as it can negatively impact readability.
  • If other visual cues already provide sufficient differentiation between content.

The preview has been updated.

The preview has been updated.

Accessibility

The component is built using the <hr> element, which has a semantic function as a separator and is announced as "separator" by screen readers.

If the component is used purely for decorative purposes, this can be repetitive and distracting for assistive technology users.

To prevent this, add role="presentation" to the <hr> element to hide it from screen readers:

Use this only when the component is purely decorative and does not convey a meaningful separation between sections.

Props

Divider
This component is implemented using the <hr /> as the root element. You can utilize the native attributes supported by <hr /> tag. The ref is directly assigned to the root element, allowing you to access and manipulate it as needed.
See core props for additional props that can be applied to this component.

Related