Dividers
A divider is a thin line that groups content in lists and layouts.
Dividers separate content into clear groups.
List Dividers
The divider renders as an <hr>
by default.
You can save rendering this DOM element by using the divider
property on the ListItem
component.
<List component="nav" className={classes.root} aria-label="mailbox folders">
<ListItem button>
<ListItemText primary="Inbox" />
</ListItem>
<Divider />
<ListItem button divider>
<ListItemText primary="Drafts" />
</ListItem>
<ListItem button>
<ListItemText primary="Trash" />
</ListItem>
<Divider light />
<ListItem button>
<ListItemText primary="Spam" />
</ListItem>
</List>
HTML5 Specification
In a list, you should ensure the Divider
is rendered as an <li>
to match the HTML5 specification.
The examples below show two ways of achieving this.
Inset Dividers
Toothbrush
$4.50
Pinstriped cornflower blue cotton blouse takes you on a walk to the park or just down the hall.
Select type
Extra Soft
Soft
Medium
Hard
<Grid container alignItems="center" className={classes.root}>
<FormatAlignLeftIcon />
<FormatAlignCenterIcon />
<FormatAlignRightIcon />
<Divider orientation="vertical" />
<FormatBoldIcon />
<FormatItalicIcon />
<FormatUnderlinedIcon />
</Grid>