Skip to content
OAIT Design System

Design system / Components

Divider

A 1px outline-variant hairline that separates content, and the "or" divider between two ways to do the same thing.

When to use

  • Between groups of content that share a surface: between sections of a sheet, a dialog, or a long card, between the groups of a navigation drawer or the phone menu (D-CSN-02). A card's footer and a list's rows draw their own hairlines.
  • Inset, where rows have a 40px leading slot and the rule should start at the text column.
  • The "or" divider: between two equal ways to do one thing in one card, such as "Scan a code" and "Type the code". Not on the sign-in page: there Sign in with Global ID sits directly under the filled "Sign in" with no divider (canonical §1.8, template 2, D-BCP-43).

When not to use

Situation Use instead
Between list rows The list's own hairlines (.oa-list), not a divider per row
Between table rows The table's cell rules
Between cards The grid's 16px gap; cards carry their own edges
Around a control The control's own edge (outline, 3:1); a hairline never identifies a control
Between page sections Space (gap-section), or a section header
A footer's top edge The footer's own edge

Anatomy

  1. Hairline .oa-divider: an <hr>, 1px outline-variant, the full width of its container.
  2. Inset .oa-divider--inset: the hairline starting at the text column (72px, 80px from 640px).
  3. "Or" divider .oa-divider-or: two hairlines around the word, in body-md on-surface-variant.

Variants

Variant Class Use for Key tokens
Hairline (default) oa-divider Separating groups on one surface 1px --color-outline-variant
Inset oa-divider oa-divider--inset Rows with a 40px leading slot --space-row-inset + --size-avatar-sm + --space-4
"Or" oa-divider-or Between two equal ways to do one thing (never on the sign-in page, D-BCP-43) --color-outline-variant, --text-body-md, --color-on-surface-variant, --space-4

There is one hairline color, outline-variant, at full strength: no /60, /70, or /80 alpha variants, no surface-container-highest lines (D-CSN-02, canonical §2.4, §6.2). Hairlines are decorative (about 1.6:1): nothing depends on seeing them.

Sizes

Size Height Padding Type style Icon size
Hairline 1px none; the space around it is the parent's gap — —
Inset 1px starts 72px in (16 + 40 + 16), 80px from 640px (24 + 40 + 16) — —
"Or" 20px (the text line) 16px between each line and the word body-md 14/20 —

Tokens

Part Property Token
Hairline color, weight --color-outline-variant, 1px solid
Inset start calc(var(--space-row-inset) + var(--size-avatar-sm) + var(--space-4)); from 640px --space-row-inset-medium in place of --space-row-inset
"Or" lines 1px --color-outline-variant
"Or" word --text-body-md, --color-on-surface-variant
"Or" gap --space-4

States

A divider has no states: it is not interactive and does not change.

Behavior

  • Dividers never add their own margins: the parent's gap places them (.oa-stack, the card's 16px).
  • The "or" divider stretches its two lines to fill the column; the word stays centered.
  • Accent rules on one side (a selected edge) are not dividers: they use border-inline-start on the element (Elevation and borders) (canonical §6.2).

Accessibility

  • A thematic break between content is <hr> (role separator); a purely visual rule inside a component is a border, not an element.
  • The "or" divider is a paragraph: screen readers read "or" between the two ways. Its lines are pseudo-elements.
  • Contrast: the hairline is decorative and exempt; the word "or" in on-surface-variant reaches 8.88:1 (light) and 10.87:1 (dark) on the page.
  • Forced colors: borders stay, so the lines stay.

RTL and languages

  • The inset starts at the inline start: the right in Arabic.
  • The "or" word: "or" / "أو" / "ou" (Arabic and French: native review).

Content

  • The "or" divider holds one lowercase word, no punctuation: "or".
  • Nothing else is written on a divider.

Do and don't

Do Don't
Use outline-variant at full strength. Use alpha variants (/60, /70) or #eae0da lines.
Let the parent's gap space the divider. Add margins to dividers one by one.
Put "or" between the Global ID kit and local sign-in. Put other sign-in providers above the kit.
Use the list's hairlines between rows. Insert an <hr> between list items.

Code

HTML (reference CSS)

Hairline:

<hr class="oa-divider">

Inset:

<hr class="oa-divider oa-divider--inset">

The "or" divider, and its Arabic:

<p class="oa-divider-or">or</p>
<p class="oa-divider-or">أو</p>

Tailwind CSS v4

<hr class="m-0 border-0 border-t border-outline-variant">
<hr class="m-0 ms-18 border-0 border-t border-outline-variant sm:ms-20">
<p class="flex items-center gap-4 text-body-md text-on-surface-variant before:flex-1 before:border-t before:border-outline-variant after:flex-1 after:border-t after:border-outline-variant">or</p>

React

Prop Type Default Description
Divider.inset boolean false Starts at the text column of rows with a 40px leading slot.
OrDivider.label string "or" Translated: "أو", "ou".
<SignInWithGlobalId />
<OrDivider label={t('or')} />
<PasswordSignIn />