Divider is a thin rounded rule that separates two logically distinct sections of content. It is purely decorative: it renders a single element marked aria-hidden, so it is never announced and never reachable.Divider when a design pattern calls for a visible break between genuinely distinct sections. Prefer a container’s material and spacing when grouping content; adjacent list rows already provide their own structure.import {
Divider,
DividerOrientation,
TextStyle,
TextView,
} from '@wearables-ui-toolkit/mrbd';
function AudioSection() {
return (
<div className="section">
<TextView textStyle={TextStyle.HEADING2}>Audio</TextView>
<Divider />
<TextView textStyle={TextStyle.BODY2}>Output and balance</TextView>
</div>
);
}
function StatBar() {
return (
<div className="statBar">
<TextView textStyle={TextStyle.META2}>84%</TextView>
<Divider orientation={DividerOrientation.VERTICAL} />
<TextView textStyle={TextStyle.META2}>12 GB free</TextView>
</div>
);
}
.section {
display: flex;
flex-direction: column;
gap: var(--uit-spacing-medium);
}
/* A vertical divider stretches to the row height, so the row needs one. */
.statBar {
display: flex;
align-items: stretch;
gap: var(--uit-spacing-small);
}
DividerProps. It extends HTMLAttributes<HTMLDivElement>, so the standard div attributes — including title and data-* — are forwarded to the rendered element, and the component forwards its ref there too.| Prop | Type | Default | Description |
|---|---|---|---|
orientation | DividerOrientation | DividerOrientation.HORIZONTAL | Which axis the rule runs along. |
className | string | '' | Extra class on the element, appended after the component’s own class. |
style | CSSProperties | {} | Inline styles. Merged after the component’s own geometry, so it can override the computed size — reserve it for placement. |
DividerOrientation| Member | Result |
|---|---|
HORIZONTAL | Fills the available width at a fixed thickness. The default. |
VERTICAL | Fills the available height at a fixed thickness. |
align-items: stretch is enough.style is merged after that computed geometry, so style= shortens a horizontal rule. Use it for placement only; the thickness, color, and rounded ends are the component’s to set.--uit-color-border-primary and has rounded ends. It never shrinks when its flex container runs out of room, so a crowded row squeezes the content rather than the separator.Divider always sets aria-hidden on itself — the component applies it last, so it cannot be turned off through props — and supplies nothing else. It has no role, no name, and no place in the accessibility tree.ContainerHeader at the top of each group says far more than a line between them.ButtonDivider for logical groups inside an action row.VerticalList directly adjacent rather than inserting a divider between each row.Divider is always hidden from assistive technology. A role, label, or child cannot make it announce content, so express meaning with a heading or region.