Skip to content
GitHub (opens in a new tab)

Divider

Thin rule that separates content, horizontal or vertical, with an optional label or action on the line.

stableAtomcontracts/divider.json

Preview

Divider

Thin rule between groups of content, with an optional label or action on the line. Not a spacer. Not a container border.

Master

A faint horizontal rule with the label or in the centre. Variants shows tone, alignment, an action and vertical.

or

Usage

Plain horizontal renders an hr. Vertical renders role=separator with aria-orientation. With a label or action, the line halves are decorative and the label is plain text. Use space tokens for whitespace, not a Divider.

Do's

  • Separating groups of content inside one surface (form groups, menu-like stacks, card bodies)
  • An 'or' break between two choices, e.g. between sign-in methods
  • A 'Show more' or 'Add' action sitting on the line between list sections
  • A vertical rule between items in a toolbar or metadata row

Don'ts

  • Card or Section edges that already draw a border — let the container own it
  • Inside Section headers or PageHeader — they have their own structure
  • As a spacer — use space tokens (gap, margin) for whitespace
  • Between table rows or list rows — Table, DataTable, and ListView draw their own row lines
  • Headed groups of content — use Section or a heading
<Divider label="or" />

When to use

  • Separating groups of content inside one surface (form groups, menu-like stacks, card bodies)
  • An 'or' break between two choices, e.g. between sign-in methods
  • A 'Show more' or 'Add' action sitting on the line between list sections
  • A vertical rule between items in a toolbar or metadata row

When not to use

  • Card or Section edges that already draw a border — let the container own it
  • Inside Section headers or PageHeader — they have their own structure
  • As a spacer — use space tokens (gap, margin) for whitespace
  • Between table rows or list rows — Table, DataTable, and ListView draw their own row lines
  • Headed groups of content — use Section or a heading

What an agent reads

import { Divider } from "agentic-ds-kit";
must
  • Plain horizontal divider renders <hr> (implicit separator role)
  • Vertical divider renders role="separator" with aria-orientation="vertical"
  • With label or action, the line segments are aria-hidden and the label is plain text; no separator role, so the label stays readable
  • action keeps its own accessible name (a kit Button with visible text)
defaults
  • orientation horizontal
  • align center
  • tone faint
stops if
  • Do not invent a local Divider, Separator, or <hr> style
  • Do not use Divider for spacing or to add margins
  • Do not stack Divider against a container border
  • Do not put long text in label — keep it to a word or two
  • Do not use raw hex

From contracts/divider.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
orientationhorizontal | verticalNohorizontal—
labelstringNo—Short text on the line. Horizontal only; ignored when vertical.
alignstart | center | endNocenterPosition of label and action on the line. Horizontal only.
actionslotNo—One inline control, normally kit Button appearance="ghost" mode="neutral" size="sm". Horizontal only.
tonefaint | defaultNofaintfaint uses border.faint; default uses border.strong
  • Component
    →

    Card

    Framed tile with optional header, body, and footer actions.

  • Component
    →

    Section

    Grouped page block with optional heading, description, and actions.

  • Component
    →

    PageHeader

    Top-of-page title with optional Breadcrumb trail, subtitle, actions, page Tabs, a profile Avatar and a decorative cover.

  • Component
    →

    Table

    Simple semantic table for invoices, lists, and text rows, with optional sort, row menu, sticky header, loading, empty and error states, row dividers on or off, and one optional highlighted row.