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)
Usage guidelines
Link to “Usage guidelines”- 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.
Anatomy
Link to “Anatomy”A divider is a single element.
Inbox
Sent
<p>Inbox</p>
<md-gb-divider></md-gb-divider>
<p>Sent</p>Examples
Link to “Examples”Insets
Link to “Insets”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>Vertical
Link to “Vertical”Add vertical for a divider between side-by-side content.
<div style="display: flex; align-items: center; gap: 8px">
<span>Day</span>
<md-gb-divider vertical></md-gb-divider>
<span>Week</span>
</div>Class API
Link to “Class API”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.
<span>Day</span>
<hr id="rule">
<span>Week</span>@import '@material/web/labs/gb/components/divider/divider.css';
#rule {
align-self: stretch;
}import {dividerClasses} from '@material/web/labs/gb/components/divider/divider.js';
const classes = dividerClasses({vertical: true});
document.querySelector('#rule')!.className = Object.keys(classes)
.filter((name) => classes[name])
.join(' ');Accessibility
Link to “Accessibility”- 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>Compatibility
Link to “Compatibility”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.
divider on m3.material.io (opens in a new tab) How compliance is measured
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.
Browser support Learn more about Baseline (opens in a new tab)
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.
WAI-ARIA 1.3 (opens in a new tab) ARIA Authoring Practices (opens in a new tab) Accessibility
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.
API reference
Link to “API reference”<md-gb-divider>
Link to “<md-gb-divider>”A Material Design component.
Properties
Link to “Properties”| Property | Attribute | Type | Default |
|---|---|---|---|
insetIndents both ends 16dp (spec: middle-inset divider). |
inset |
boolean |
false |
insetEndIndents the trailing end 16dp. |
inset-end |
boolean |
false |
insetStartIndents the leading end 16dp (spec: inset divider). |
inset-start |
boolean |
false |
verticalWhether or not the divider is vertical. |
vertical |
boolean |
false |
CSS parts
Link to “CSS parts”| Part | Description |
|---|---|
::part(divider) |
The divider element. |
CSS custom properties
Link to “CSS custom properties”| Property | Description |
|---|---|
--color |
|
--inset-leading-space |
|
--inset-trailing-space |
|
--thickness |