Weftv0.4.0
GitHubFigma
Blade AI
Display · Dividerstable

Divider

A thin line that separates groups of content: a card header from its body, items in a list, or controls in a toolbar. Horizontal or vertical, thin or thick, solid or dashed, in three emphases, with optional centred text.

Preview

#preview

Change the options and the code follows. Show code opens the React snippet.

divider-example.tsx
import { Divider } from "@blade-ai/weft/components/divider";

<Divider />

All states

#all-states

Thickness and line style, emphasis, vertical, text divider and inline separators, from the Divider artboard.

Divider · 9 variants
Thin · Solid
Thin · Dashed
Thick · Solid
Thick · Dashed
Normal
Subtle
Muted
Vertical
Text divider
TodayINRAll methods
Inline separators

Props

#props

Read from the component source. Booleans are is-prefixed. A star marks a required prop.

Prop
Type
Default
Description
orientation
"horizontal" | "vertical"
"horizontal"
Horizontal rule or vertical rule. A vertical divider stretches to its flex row, or use className for a height.
thickness
"thin" | "thick"
"thin"
1px or 2px.
lineStyle
"solid" | "dashed"
"solid"
Line style.
emphasis
"normal" | "subtle" | "muted"
"normal"
—
children
ReactNode
—
Text centred on a horizontal divider, e.g. "or continue with".
isDecorative
boolean
true
Purely visual: hides the divider from assistive tech. Defaults to true; set false when it separates landmarks.

Usage

#usage

Short rules for choosing and writing divider.

Do
Use spacing first and add a divider only when spacing does not separate the groups.
Place dividers between groups, inside the container.
Use a text divider for choices such as "or continue with".
Don't
Put a divider between every row.
Add a divider right above or below a container border.
Use a divider as a heading.

Accessibility

#accessibility

Decorative by default, so screen readers skip it.

ARIA
Element
Role / attribute
When
Decorative divider
aria-hidden="true"
isDecorative, the default.
Meaningful divider
role="separator" · aria-orientation
isDecorative={false}, for example between menu regions.
Contrast
decorative
Decorative lines have no contrast requirement.