Skip to content
menumenu tanreiexpand_morecontrasttranslate
tanreiexpand_more
Getting startedWebReactSwiftUIJetpack ComposeFlutterReact NativePresetsYour own design systemUsing Tanrei with AI agentsBrandDesign tokensDesign systems and customizationTheme StudioColorTypographyIconsShapeElevationMotionInteraction statesBehaviourLayoutAccessibilityWordsColor tokensTypescale tokensShape tokensElevation tokensMotion tokensState tokensSpace and measure tokensComponentsButtonMain action buttonSegmented buttonButton groupButton with menuToolbarCopy buttonCheckboxRadio buttonSwitchChipMenuSliderSlider fieldCalendarDateTimePickerField groupRadio groupCheckbox groupSelectSelect fieldMenubarFile uploadFile picker AdvancedDrop zoneText input AdvancedText fieldChip fieldFieldCombobox AdvancedCombobox fieldNumber input AdvancedNumber fieldColor input AdvancedColor fieldOne-time-code input AdvancedOne-time-code fieldEmbedded text input AdvancedChat composerCardDividerModal layer AdvancedDialogListList rowBottom sheetSide sheetCarouselCode blockTablePopoverStepsAccordionDescription listFigureApp shellPage headerTree viewTimelineImage previewHandleResizable frameScroll areaBadgeProgress indicatorMeterNumber tickerLoading indicatorSnackbarTooltipKeyboard shortcutTagInline codeCalloutAvatarEmpty stateTag groupSkeletonFile itemSwatchMarquee textTabsTab viewApp barNavigation barNavigation drawerSearchLinkPaginationPrevious and next linksStepperBreadcrumbsTable of contentsLink cardFAB menuStatusHow Tanrei is builtContributingLicense and attribution
HomeComponentsDivider

Divider

Separates groups of content in a list, a layout or a toolbar with a thin line.

content_copyView as Markdown
Category
Containment
Tokens
comp.divider
Level
Base

Overview

Web
tanrei-divider
schedule
SwiftUI
TanreiDivider
schedule
Jetpack Compose
TanreiDivider
schedule
Flutter
TanreiDivider
schedule
React Native
Divider
schedule

Generated from docs/status/status.json, specs/divider.spec.json

In a list and in a toolbar

InboxArchiveTrash
format_boldformat_italiclink

Usage

The Web and React samples show the current spec. SwiftUI, Compose, Flutter and React Native are lagging: they still ship the previous revision of the divider, which draws solid lines only and takes no per-divider lengths or thickness, and their samples show that revision until they catch up.

<tanrei-divider></tanrei-divider>
<tanrei-divider inset="start"></tanrei-divider>

<!-- Line up with a list whose text starts 72 px in. -->
<tanrei-divider inset="start" inset-length="72"></tanrei-divider>

<!-- A tear line above a coupon, and a light section break. -->
<tanrei-divider line-style="dashed" line-cap="round"></tanrei-divider>
<tanrei-divider line-style="wavy" amplitude="4" wavelength="24"></tanrei-divider>

<!-- A thicker line for this divider alone: its dots, dashes and wave keep their proportions. -->
<tanrei-divider thickness="2"></tanrei-divider>
<tanrei-divider line-style="dotted" line-cap="round" thickness="4"></tanrei-divider>

<!-- A toolbar's groups mean something: expose the divider as a separator. -->
<div role="toolbar" aria-label="Formatting" style="display: flex">
  <tanrei-button variant="text" label="Bold"><span slot="icon">format_bold</span></tanrei-button>
  <tanrei-divider orientation="vertical" decorative="false"></tanrei-divider>
  <tanrei-button variant="text" label="Insert link"><span slot="icon">link</span></tanrei-button>
</div>

<script type="module">
  import '@tanrei/web/components/divider';
</script>
import { Divider } from '@tanrei/react';

<Divider />
<Divider inset="start" insetLength={72} />
<Divider lineStyle="dashed" lineCap="round" />
<Divider lineStyle="wavy" amplitude={4} wavelength={24} />
<Divider lineStyle="dotted" lineCap="round" thickness={4} />
<Divider orientation="vertical" decorative={false} />
import Tanrei

VStack(spacing: 0) {
  inboxRow
  TanreiDivider(inset: .start)
  archiveRow
}

// The axis is stated, not taken from the enclosing stack.
HStack { formattingButtons; TanreiDivider(axis: .vertical, isDecorative: false); insertLinkButton }
import androidx.compose.foundation.gestures.Orientation
import io.github.chnotchy.tanrei.components.TanreiDivider
import io.github.chnotchy.tanrei.components.TanreiDividerInset

Column {
    InboxRow()
    TanreiDivider(inset = TanreiDividerInset.Start)
    ArchiveRow()
}

// A vertical divider fills the row's height, so give the row one.
Row(Modifier.height(IntrinsicSize.Min)) {
    FormattingButtons()
    TanreiDivider(orientation = Orientation.Vertical, decorative = false)
    InsertLinkButton()
}
import 'package:tanrei/tanrei.dart';

Column(
  children: <Widget>[
    inboxRow,
    const TanreiDivider(inset: TanreiDividerInset.start),
    archiveRow,
  ],
);

// IntrinsicHeight gives a vertical divider the row's height.
IntrinsicHeight(
  child: Row(
    children: <Widget>[
      ...formattingButtons,
      const TanreiDivider(axis: Axis.vertical, excludeFromSemantics: false),
      insertLinkButton,
    ],
  ),
);
import { Divider, IconButton } from '@tanrei/react-native';

<Divider />
<Divider inset="start" />

<View style={{ flexDirection: 'row' }}>
  <IconButton accessibilityLabel="Bold" onPress={toggleBold}>format_bold</IconButton>
  <Divider orientation="vertical" decorative={false} />
  <IconButton accessibilityLabel="Insert link" onPress={insertLink}>link</IconButton>
</View>

Specs

Orientations and insets

Line styles

Thickness: one divider's own, with round caps on the thicker patterns

A dotted or dashed line always has a whole dot or dash at both ends: the divider draws as many as fit with at least the gap between them, and widens every gap by the same amount. It looks the same at both ends, in either direction and at any length. A wave is made of circular arcs, stretched to a whole number of waves so that it starts and ends on the midline. A wavy divider is taller than the others: twice the amplitude plus the line’s thickness, 5 by default instead of 1.

The lengths of the dots, the dashes and the wave are tokens derived from the line’s thickness, so a design system that draws thicker dividers gets a larger pattern with the same look. thickness does the same for one divider: it stands in for the token wherever the thickness is read, and the dots, dashes and wave keep their proportions to it. The inset is not scaled. The per-divider props (insetLength, thickness, dashLength, gap, amplitude, wavelength) are used as given, in the platform’s unit, and no dial scales them. A negative or non-finite value, or a thickness, dashLength or wavelength of 0, falls back to the token and is reported in debug builds. A prop the current style does not draw is ignored.

Anatomy

Anatomy

Drawn over the fixture horizontal, as the web package draws it.
Part Description
1 line The one line, horizontal or vertical: solid, dotted, dashed or wavy. Its thickness is the system's, or the one given for this divider. It is the whole component: there is no container, and no space around it.

Properties

Property Type Default Description
orientation horizontal | vertical "horizontal" Horizontal separates stacked content and spans the container's width; vertical separates content in a row and spans its height.
inset none | start | both "none" Shortens the line to align with content: none spans the full length, start leaves the inset at the start (to line up with an inset list's text), both leaves it at both ends (a middle divider).
insetLength number null The length of the inset for this divider, in the platform's unit (CSS px, pt, dp, logical pixels); null takes comp.divider.line.inset. Used only while inset is start or both: set it to line the divider up with content whose inset differs from the rest of the product's lists.
thickness number null How thick this divider's line is, in the platform's unit (CSS px, pt, dp, logical pixels); null takes comp.divider.line.thickness. Set it where one divider of a product carries more weight than the rest (the line under a page's header, a break between two sections of a long form); a product whose every divider is heavier changes the token in its layer instead.
lineStyle solid | dotted | dashed | wavy "solid" How the line is drawn: solid, a row of dots, a row of dashes, or a wave. Most dividers are solid; the others mark a different kind of boundary in the same product (a tear line, the edge of something provisional, a light section break).
lineCap butt | round "butt" How the line's ends, and every dot's and dash's ends, are drawn: butt ends square at the length, round ends in a half-disc inside it (round dots, rounded dashes). The difference shows only on a line thicker than a hairline.
dashLength number null The length of one dash of a dashed line, in the platform's unit; null takes comp.divider.line.dash.length. Ignored by the other styles.
gap number null The least space between two dots of a dotted line or two dashes of a dashed line, in the platform's unit; null takes comp.divider.line.dot.gap or comp.divider.line.dash.gap. Ignored by solid and wavy.
amplitude number null How far a wavy line's crests lie from its midline, in the platform's unit; null takes comp.divider.line.wave.amplitude. Ignored by the other styles.
wavelength number null The length of one wave of a wavy line, a crest and a trough, in the platform's unit; null takes comp.divider.line.wave.wavelength. Ignored by the other styles.
decorative boolean true Hides the divider from assistive technology. Set it to false only when the grouping is meaningful (a toolbar's or a menu's groups): the divider is then exposed as a separator.

States

Behavior

Requirements in EARS form. Every platform implementation is tested against these ids.

ID Requirement
DIV-1 THE divider SHALL draw one line of comp.divider.line.thickness, or of thickness while that is not null (DIV-16), in comp.divider.line.color, in the style lineStyle names (DIV-9 to DIV-12), along the full inline size of its container when orientation is horizontal, and along the full block size of its container when orientation is vertical.
DIV-2 THE divider SHALL take exactly comp.divider.line.thickness on its cross axis, or, WHERE lineStyle is wavy, twice its amplitude (DIV-12) plus comp.divider.line.thickness, whatever its length; it SHALL add no margin or padding of its own, and the space on either side of the line belongs to the layout that places it.
DIV-3 WHERE inset is start THE divider SHALL shorten the line by insetLength, or by comp.divider.line.inset while insetLength is null, at its start (the inline-start of a horizontal divider, the top of a vertical one), and WHERE inset is both it SHALL shorten the line by that length at each end; the inset stretch SHALL draw nothing, the style of DIV-9 to DIV-12 SHALL be laid out over the stretch that remains, and where the insets leave no length the divider SHALL draw nothing.
DIV-4 WHERE the layout direction is right-to-left THE divider SHALL apply the start inset of a horizontal divider at its right end and SHALL start a horizontal wavy line at its right end, mirroring it; a vertical divider's inset and wave SHALL NOT change with the direction.
DIV-5 WHILE decorative is true THE divider SHALL be hidden from assistive technology and SHALL NOT be focusable.
DIV-6 WHILE decorative is false THE divider SHALL expose the separator role and its orientation to assistive technology, SHALL have no accessible name of its own, and SHALL NOT be focusable.
DIV-7 WHEN orientation, inset, lineStyle or lineCap names a value that the divider does not define THE divider SHALL render with the default value, and in debug builds report the unknown value.
DIV-8 THE divider SHALL draw its line at least one device pixel thick; WHERE lineStyle is solid, dotted or dashed it SHALL align the line's two edges across its axis to the device pixel grid, so that the line is never spread over two partial rows or columns of pixels, and WHERE lineStyle is wavy it SHALL draw the curve antialiased.
DIV-9 WHERE lineStyle is solid THE divider SHALL draw the line as one unbroken stroke over the whole drawn stretch.
DIV-10 WHERE lineStyle is dotted THE divider SHALL draw a row of dots, each comp.divider.line.thickness long and comp.divider.line.thickness across, separated by at least gap, or comp.divider.line.dot.gap while gap is null; it SHALL draw as many dots as fit the drawn stretch with that gap between them, the first at the stretch's start and the last at its end, and SHALL widen every gap by the same amount to make them meet those ends; WHERE only one dot fits it SHALL draw that dot at the stretch's center.
DIV-11 WHERE lineStyle is dashed THE divider SHALL draw a row of dashes, each dashLength long (comp.divider.line.dash.length while dashLength is null, and never shorter than comp.divider.line.thickness) and comp.divider.line.thickness across, separated by at least gap, or comp.divider.line.dash.gap while gap is null; it SHALL draw as many dashes as fit the drawn stretch with that gap between them, the first at the stretch's start and the last at its end, and SHALL widen every gap by the same amount to make them meet those ends; WHERE only one dash fits it SHALL draw one dash, no longer than the stretch, at the stretch's center.
DIV-12 WHERE lineStyle is wavy THE divider SHALL stroke a wave about the midline of its cross axis at comp.divider.line.thickness, made of circular arcs that each span half a wavelength and alternate from one side of the midline to the other, meeting on the midline without a corner; the wavelength is wavelength, or comp.divider.line.wave.wavelength while wavelength is null, stretched or shrunk so that a whole number of waves (at least one, the nearest number) fills the drawn stretch; each arc's crest SHALL lie amplitude, or comp.divider.line.wave.amplitude while amplitude is null, from the midline to the stroke's center, but never more than a quarter of the stretched wavelength (a half circle); the wave SHALL start and end on the midline, and its first arc SHALL rise toward the top of a horizontal divider and toward the left of a vertical one.
DIV-13 WHERE lineCap is round THE divider SHALL end the solid line, every dot, every dash and the wave in half-discs of diameter comp.divider.line.thickness that lie inside the lengths DIV-9 to DIV-12 give them, so that a dot is a disc and no rounded end reaches into an inset or past the container; the wave's rounded ends SHALL be drawn at its first and last points, laid out over the drawn stretch shortened by half comp.divider.line.thickness at each end. WHERE lineCap is butt every end SHALL be square and flush with those lengths.
DIV-14 WHEN thickness, insetLength, dashLength, gap, amplitude or wavelength is null THE divider SHALL use the token that prop names; IF one of them is not a finite number, or is negative, or thickness, dashLength or wavelength is 0, THE divider SHALL use that token instead and in debug builds report the value; a value it uses SHALL be used as given, in the platform's unit, and not scaled by any dial; a prop the current lineStyle does not draw SHALL be ignored and not reported.
DIV-15 THE divider SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the divider is shown THE divider SHALL draw itself for the new direction at once, without a motion of its own, keeping what it shows and its state.
DIV-16 WHILE thickness is not null THE divider SHALL use it wherever DIV-1, DIV-2 and DIV-10 to DIV-13 name comp.divider.line.thickness — the line's extent across its axis, the side of a dot, the width of a dash and its least length, the wave's stroke, the diameter of a round cap and the divider's own size across its axis — and SHALL scale each pattern length it takes from a token rather than from a prop (comp.divider.line.dot.gap, comp.divider.line.dash.length, comp.divider.line.dash.gap, comp.divider.line.wave.amplitude and comp.divider.line.wave.wavelength) by thickness divided by comp.divider.line.thickness, so that a thicker divider keeps the pattern's proportions, as a layer that thickens the line keeps them; a pattern length given by a prop SHALL be used as given. DIV-8 holds for it: a thickness below one device pixel is drawn one device pixel thick. The thickness changes nothing that assistive technology is told, and comp.divider.line.inset and insetLength are not scaled.

Platform name mapping

Parity does not mean identical APIs. Each platform uses its own idiom for the same contract.

Spec Web SwiftUI Jetpack Compose Flutter React Native
Component tanrei-divider TanreiDivider TanreiDivider TanreiDivider Divider
orientation · Property orientation axis orientation axis orientation
inset · Property inset inset inset inset inset
insetLength · Property insetLength insetLength insetLength insetLength insetLength
thickness · Property thickness thickness thickness thickness thickness
lineStyle · Property lineStyle lineStyle lineStyle lineStyle lineStyle
lineCap · Property lineCap lineCap cap strokeCap lineCap
dashLength · Property dashLength dashLength dashLength dashLength dashLength
gap · Property gap gap gap gap gap
amplitude · Property amplitude amplitude amplitude amplitude amplitude
wavelength · Property wavelength wavelength wavelength wavelength wavelength
decorative · Property decorative isDecorative decorative excludeFromSemantics decorative
Notes Not an <hr>: an hr is horizontal only and always a separator. The host takes role="separator" and aria-orientation when decorative is false (set to false by decorative="false" or the property), and aria-hidden="true" otherwise. Attributes are line-style, line-cap, inset-length, dash-length, gap, amplitude and wavelength; the lengths are numbers of CSS px. A solid line stays a border (DIV-8). A dotted or dashed line is not border-style: dotted | dashed, whose dash lengths and spacing each engine chooses and which has no round cap: it is drawn from the tokens (for example a mask repeated with mask-repeat: space over a box one gap longer than the line, which places whole dashes at both ends and widens the gaps as DIV-10 and DIV-11 say). A wavy line cannot be a border at all: it is an SVG path of arcs in the shadow root, measured on resize (DIV-12). In forced-colors mode every style is drawn in the system's text color, as the border is. SwiftUI's own Divider takes its axis from the enclosing stack; TanreiDivider(axis: .horizontal) states it (default .horizontal) so a divider looks the same wherever it is placed and its snapshot is deterministic. isDecorative: false adds the separator semantics SwiftUI's Divider does not have. Ships the previous revision (solid only). Owes DIV-1 to DIV-4, DIV-7 and DIV-8 as revised, and DIV-9 to DIV-14: lineStyle, lineCap: CGLineCap (.butt, .round) and the lengths as CGFloat?, drawn as a Path stroked with StrokeStyle(lineWidth:lineCap:dash:) (arcs with addArc). One composable with orientation: Orientation (foundation's Orientation.Horizontal / .Vertical, as Modifier.scrollable takes it) instead of Material's two composables HorizontalDivider and VerticalDivider. Ships the previous revision (solid only). Owes DIV-1 to DIV-4, DIV-7 and DIV-8 as revised, and DIV-9 to DIV-14: lineStyle, cap: StrokeCap (StrokeCap.Butt, StrokeCap.Round, as Stroke names it) and the lengths as Dp?, drawn on a Canvas with PathEffect.dashPathEffect for dots and dashes and Path.arcTo for the wave. One widget with axis: Axis instead of Flutter's Divider and VerticalDivider. inset is an enum resolved from comp.divider.line.inset, not Flutter's indent / endIndent lengths; insetLength replaces that length for one divider at both ends it applies to. excludeFromSemantics (as Image and GestureDetector name it) has the same polarity as decorative and defaults to true. Ships the previous revision (solid only). Owes DIV-1 to DIV-4, DIV-7 and DIV-8 as revised, and DIV-9 to DIV-14: lineStyle, strokeCap: StrokeCap (StrokeCap.butt, StrokeCap.round, as Paint names it) and the lengths as double?, drawn by a CustomPainter; dart:ui has no dash effect, so each dot and dash is its own segment, and the wave is Path.arcToPoint. Decorative: accessible={false} and importantForAccessibility="no-hide-descendants". Not decorative: role="separator"; how far iOS and Android announce it (neither has a native separator trait) is for the package's README to state. Ships the previous revision (solid only). Owes DIV-1 to DIV-4, DIV-7 and DIV-8 as revised, and DIV-9 to DIV-14, drawn with views only (the package takes no SVG): not borderStyle: 'dotted' | 'dashed', whose spacing is the OS's and which has no length or cap; each dot and dash is a view (a round cap is its corner radius), and the wave is the package's Arc primitive, one arc per half wave, which is why DIV-12 builds the wave from circular arcs.

Tokens

Token Aliases Resolved (light)
--tanrei-comp-divider-line-color sys.color.outline-variant #000000 · 8%
--tanrei-comp-divider-line-dash-gap — 4px
--tanrei-comp-divider-line-dash-length — 4px
--tanrei-comp-divider-line-dot-gap — 2px
--tanrei-comp-divider-line-inset sys.space.space200 16px
--tanrei-comp-divider-line-thickness sys.border.hairline 1px
--tanrei-comp-divider-line-wave-amplitude — 2px
--tanrei-comp-divider-line-wave-wavelength — 16px

Fixtures

Canonical renderings. Every platform snapshots each fixture under the same id so the results can be compared.

Generated from specs/divider.spec.json, tokens/comp/divider.tokens.json, design/tokens/

Guidelines

When to use

Use a divider where space alone does not make a boundary clear: between the rows of a dense list, between the sections of a settings page, between groups of actions in a toolbar. Where the gap between two groups, or a change of surface, already shows where one ends, leave the line out. A layout with fewer lines is easier to scan.

One hairline

The divider’s line is the design system’s hairline: sys.color.outline-variant, at the hairline width. In the default system the other thin lines a person sees are that same color: an outlined button’s edge, a chip’s outline, the line between a menu’s groups, the edge of a navigation bar or a navigation drawer, the line under a list row. They keep their own tokens, and the default system gives them one value, so that a screen has one kind of line. A divider you place needs no color of its own to match them.

Where a component separates its own parts

Some components set their own parts apart, and there you do not add a divider:

  • A menu separates a group from what is next to it.
  • A connected button group and a button with menu separate their halves.
  • A navigation drawer draws a divider before a section that asks for one (divider).
  • A list row draws the line under itself (divider), starting where its text starts.

How parts inside one component are told apart is one choice for the whole design system: by a line where they touch, which is the default, or by a gap of empty space. A component can leave the system’s choice through its own token, and one instance through its separation prop: the menu, the button group, the button with menu and the progress indicator have one. Under a gap those components draw no line at all, so a divider you added by hand would be the only line left, and would no longer match.

The divider component itself is not part of that choice. A <tanrei-divider> you place between your own content is always a line.

Choosing an inset

Inset Use for
None A boundary across the whole container: between sections, under a header.
Start Between the rows of a list whose rows start with an icon or an avatar. The line starts where the text does, so the leading column reads as one.
Both A break inside a group that should not look like a boundary of the container: a middle divider.

Set insetLength only on a divider that must line up with content whose inset differs from the rest of the product’s lists. It applies wherever inset applies the inset, and does nothing while inset is none.

Choosing a line style

Line style Use for
Solid Almost every divider. It is the default.
Dashed A boundary of a different kind in the same product: a tear line above a coupon, the edge of something provisional.
Dotted A lighter break than a solid line. It covers about a third of its length, so it reads fainter in the same color.
Wavy A section break that should read as a different kind of boundary from the solid lines around it. It takes more room across its axis than the others.

Round caps (lineCap="round") make every dot a disc and every dash a rounded bar, and round the ends of a solid or wavy line. The rounded ends stay inside the line’s length, so an inset stays exact. On the default hairline, a round cap cannot be seen: it is meant for a divider with a thickness of its own, and for design systems that draw thicker lines.

  • Put the space around a divider in the layout: a stack’s spacing, a list’s gap. The divider adds none of its own, so it never doubles a gap.
  • Keep it decorative (the default) in lists and cards. The rows already say where they start and end.
  • Set decorative to false only where the grouping means something to the person, such as the groups of a toolbar or a menu.
  • Keep one line style for one kind of boundary across the product, so that a dashed line always means the same thing.

Don’t

  • Don’t draw a line between every pair of elements. Use spacing first, and a divider where spacing is not enough.
  • Don’t use a divider as a border or an outline of a container. It has no container and no shape.
  • Don’t make it thicker or colored to give it meaning. thickness is for a pattern that needs the room to be seen, or a rule that matches thicker lines around it. The divider’s color is not held to a contrast ratio, because the content it separates must be understood without it.
  • Don’t add a divider inside a component that separates its own parts, such as between a menu’s groups or a list’s rows. Use the component’s own prop.
  • Don’t place a divider at the edge of a box that scrolls to say that more lies beyond it. A scroll area marks that edge, only while content lies beyond it, in the form the design system chose.
  • Don’t let a line style carry meaning on its own. If a dashed line means “cut here”, say so in text as well.
  • Don’t rely on it for a heading. “— or —” between two forms is two dividers and a label, and the label carries the meaning.

Accessibility

Role
separator
Labeling
A divider has no accessible name. Decorative (the default), it is not in the accessibility tree; otherwise it is a separator whose orientation is exposed, and the groups on either side carry their own names.
Minimum target
The hit area meets the minimum target size even when the visual size is smaller. minimum 32px · pointer 44px · spacing 8px · touch 48px

Keyboard

Keys Action

Notes

  • Not interactive: a divider has no hit area, so the minimum target holds without extending anything. It never receives focus, even when it is exposed as a separator (a focusable separator is a splitter, which is a different component).
  • The line is decorative for contrast purposes: comp.divider.line.color is not held to 3:1, because the content it separates must be understandable without it. A dotted or dashed line covers less of its length and reads fainter than a solid one in the same color; that is accepted for the same reason. In the default system the line is sys.color.outline-variant, the one hairline color every line of the system shares, between 1.19:1 and 3.83:1 against the surface roles depending on the scheme: visible, and never the only thing that tells two groups apart.
  • The line's style carries nothing to assistive technology: a dotted, dashed or wavy divider that is not decorative is the same separator as a solid one. A product that gives a style a meaning (a tear line, a provisional section) states that meaning in text.
  • Text size does not change the line: it is not text.

Generated from specs/divider.spec.json, tokens/sys/measure.tokens.json

What the component handles

  • Decorative (the default), it is hidden from assistive technology on every platform.
  • Not decorative, it is exposed as a separator with its orientation on the web. Apple platforms, Android and Flutter have no separator role: there it is kept in the accessibility tree with no name, and says as much as each platform can.
  • It is never focusable and takes no input, so it never gets in the way of the controls on either side.
  • Its line is at least one device pixel thick. A solid, dotted or dashed line is aligned to the pixel grid across its axis, so it is never blurred; a wave is drawn antialiased.
  • The line style says nothing to assistive technology: a dotted, dashed or wavy divider that is not decorative is the same separator as a solid one.
  • On the web, forced colors mode redraws every line style in the system’s text color.

What you need to do

  • State in text any meaning you give a line style, such as a tear line. Assistive technology does not convey the style, and a dotted or dashed line reads fainter than a solid one.
  • Give each group its own name when the grouping matters. A separator has no name, so it cannot say what the groups are.
  • Don’t use a divider to carry the structure of a page. Headings and landmarks do that; a line is only seen.