logo

SINGULARITY

DOCS

PurchaseReturn to the Dashboard
Reference

Divider

The Divider component offers a subtle, lightweight line to organize elements and enhance visual structure.

Introduction

The Material UI Divider component appears as a dark gray <hr> by default and includes various props for easy style customization.
Toothbrush
$4.50

Pinstriped cornflower blue cotton blouse takes you on a walk to the park or just down the hall.


Select type

Soft
Medium
Hard

Basics

import Divider from '@mui/material/Divider';

Variants

The Divider component offers three variants: fullWidth (default), inset, and middle.
  • Full width variant below
  • Inset variant below
  • Middle variant below
  • List item

Orientation

Apply the orientation prop to switch the Divider from horizontal to vertical. In vertical orientation, the Divider renders as a <div> with appropriate accessibility attributes instead of <hr> to comply with the WAI-ARIA spec.

Flex item

Enable the flexItem prop to properly display the Divider within a flex container.

With children

Utilize the textAlign prop to position elements wrapped by the Divider.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Customization

Use with a List

When separating items in a List, set the component prop to render the Divider as an <li> to ensure valid HTML structure.
  • Inbox
  • Drafts
  • Trash
  • Spam

Icon grouping

The example below demonstrates combining the variant="middle" and orientation="vertical" props.

Accessibility

With its implicit separator role, the Divider, a <hr> element, is announced by screen readers as a "Horizontal Splitter" (or vertical, when using the orientation prop).
For purely stylistic use, set aria-hidden="true" to prevent screen readers from announcing the Divider.
<Divider aria-hidden="true" />
When wrapping other elements like text or chips with the Divider, use the component prop to render it as a <div> and set role="presentation". This prevents screen reader announcements while maintaining the semantics of the enclosed elements.
<Divider component="div" role="presentation">
  <Typography>Text element</Typography>
</Divider>

Anatomy

The Divider component consists of a root <hr> element.
<hr className="MuiDivider-root">
  
</hr>