Skip to main content brightness_auto motion_photos_off palette download more_vert
toc

Divider

A divider is a thin line that groups content in lists and containers.

Your order has shipped.

Delivery is expected on Friday.

<p>Your order has shipped.</p>
<md-gb-divider></md-gb-divider>
<p>Delivery is expected on Friday.</p>

Install with shadcn/ui: npx shadcn@latest add https://material-web.dev/3.0/r/md-divider.json (setup)

  • Group and create hierarchy. Dividers visually group components and can imply a parent and child relationship.
  • Full width for sections. Use full-width dividers to separate larger sections of unrelated content.
  • Inset for related items. Use inset dividers to separate related content within a section, such as items in a list.
  • Don't overuse. Spacing and type styles often separate content well enough on their own.

A divider is a single element.

Inbox

Sent

<p>Inbox</p>
<md-gb-divider></md-gb-divider>
<p>Sent</p>

Add inset to indent both ends by 16dp. Use inset-start or inset-end to indent only one end.

<md-gb-divider></md-gb-divider>
<md-gb-divider inset-start></md-gb-divider>
<md-gb-divider inset></md-gb-divider>

Add vertical for a divider between side-by-side content.

Day Week
<div style="display: flex; align-items: center; gap: 8px">
  <span>Day</span>
  <md-gb-divider vertical></md-gb-divider>
  <span>Week</span>
</div>

For plain HTML, the divider classes style a native <hr>. divider() is a Lit directive that adds them, and dividerClasses() returns them for other code. Pass {vertical: true} for a vertical divider.

HTMLCSSTS
<span>Day</span>
<hr id="rule">
<span>Week</span>
  • A divider is decorative and not announced by assistive technology. It has no contrast minimum.
  • Add role="separator" to a divider that should be announced.

Account

Privacy

<p>Account</p>
<md-gb-divider role="separator"></md-gb-divider>
<p>Privacy</p>
Material Design 3Spec checked50% tokens

20 of 48 buildable spec units are tested, 4 are excluded with a written reason and 0 are uncovered (the target is 0). 2 of 4 token declarations match the spec (50%), and 2 have no spec token.

BaselineWidely availableChrome 124Edge 124Firefox 125Safari 17.4

The component’s own CSS and JavaScript rely only on web platform features that are Baseline widely available: it works in Chrome 124, Edge 124, Firefox 125, Safari 17.4 and later.

It uses no newer features.

WAI-ARIAaxe and ARIA 1.3 pass

Roles the component renders: separator (opens in a new tab).

1 rendered state run through axe-core and the WAI-ARIA 1.3 role and attribute rules in a real browser, with no known gaps.

Lighthouse100 · 100 · 100 · 100
  • Performance
  • Accessibility
  • Best practices
  • SEO

Audits under 90:

  • Eliminate render-blocking resources
  • Minify JavaScript
  • Enable text compression
  • Network dependency tree
  • Render blocking requests

Lighthouse 12.8.2 (desktop, 2026-11-08) on the component alone: its first example on a page of its own, without this site's shell. The modules are the development build (not bundled or minified), so the performance score is indicative.

A Material Design component.

Property Attribute Type Default
inset
Indents both ends 16dp (spec: middle-inset divider).
inset boolean false
insetEnd
Indents the trailing end 16dp.
inset-end boolean false
insetStart
Indents the leading end 16dp (spec: inset divider).
inset-start boolean false
vertical
Whether or not the divider is vertical.
vertical boolean false
Part Description
::part(divider) The divider element.
Property Description
--color
--inset-leading-space
--inset-trailing-space
--thickness
Install Material Web 3.0

Your browser did not offer to install the docs as an app. Install them from the browser instead:

Close
Send feedback
Bug Documentation Idea

Opens a new GitHub issue for material-components/material-web in a new tab, with this filled in.

Cancel Open issue