Thickness
Three token-driven thicknesses are available. The default is md (2px).
Thickness ramp
sm (1px), md (2px, default), and lg (4px).
<div className="flex flex-col gap-6 w-60">
<Divider thickness="sm" />
<Divider thickness="md" />
<Divider thickness="lg" />
</div>Colour
Two token-driven colours are available: default (--color-border-default) and strong (--color-border-strong, a touch darker).
Colours
default and strong.
<div className="flex flex-col gap-6 w-60">
<Divider colour="default" />
<Divider colour="strong" />
</div>Direction
horizontal (default) fills width; vertical self-stretches (align-self: stretch / alignSelf: 'stretch') to fill the height of the flex row it’s placed in — this overrides even a row with items-center, so it matches the height of whatever sibling content established the row, with no fixed-height wrapper needed. In this isolated demo there’s no sibling content to establish a height, so the wrapper still needs an explicit height.
Direction
horizontal (default) and vertical.
<div className="flex items-start gap-6">
<div className="w-60">
<Divider direction="horizontal" />
</div>
<div className="flex h-16">
<Divider direction="vertical" />
</div>
</div>Inline (end-cap shape)
inline (default false) gives rounded end-caps; true gives flat/square 90° ends. Only visibly different at thickness="lg".
Inline
Rounded ends (default) vs. flat/square ends, at thickness=lg.
<div className="flex flex-col gap-6 w-60">
<Divider thickness="lg" inline={false} />
<Divider thickness="lg" inline={true} />
</div>Surface tone
Neither default nor strong colour has an inverse counterpart today, so Divider looks the same on both tones rather than switching.
Neutral vs. inverse surface
Same fixed colour on both tones — there is no inverse token to switch to yet.
<div className="flex gap-4">
<Surface tone="neutral" className="w-60 p-4">
<Divider />
</Surface>
<Surface tone="inverse" className="w-60 p-4">
<Divider />
</Surface>
</div>When to use
Use Divider to separate distinct sections of content with a thin horizontal rule — for example between a panel’s header and body, or between body content and a footer. Modal and BottomSheet both use it internally for exactly this.
Thickness
| Thickness | px | Typical use |
|---|---|---|
sm | 1 | Subtle separators within a single section |
md | 2 | Default — section boundaries (header/footer) |
lg | 4 | Stronger separation between major page regions |
Accessibility
Divider is always decorative (aria-hidden="true" / accessibilityElementsHidden on native) — it has no accessible name or role. The sections it separates already convey structure through the surrounding DOM/component tree.
When not to use
- A bordered container: if you just need a bottom/top border on an existing box, a border utility may be simpler than introducing a new element.
Props
Divider is a Tier-2 (a11y-allowlist) component — only id/data-testid (web) or nativeID/testID/accessibilityHint (native) pass through beyond the props below. There is no className/style passthrough; sizing comes from thickness/direction and colour comes from colour.
| Prop | Type | Default | Description |
|---|---|---|---|
| thickness | 'sm' | 'md' | 'lg' | 'md' | Token-driven thickness. Maps to --border-width-{sm,md,lg} (web) / borderWidth{Sm,Md,Lg} (native) — height for horizontal, width for vertical. |
| colour | 'default' | 'strong' | 'default' | Token-driven colour. Maps to --color-border-{default,strong} (web) / colorBorder{Default,Strong} (native). No inverse-Surface counterpart today. |
| direction | 'horizontal' | 'vertical' | 'horizontal' | 'vertical' self-stretches to fill the height of the parent flex row. |
| inline | boolean | false | true gives flat/square 90° end-caps instead of rounded ones, matching Figma's stroke-linecap variant. Only visibly different at thickness="lg". |
| id | string | - | Platform-props allowlist. Forwarded to the rendered div. |
| data-testid | string | - | Platform-props allowlist. Forwarded to the rendered div. |
Import
Web
import { Divider } from '@checkatrade/components-web';
<Divider />
<Divider thickness="lg" />Native
import { Divider } from '@checkatrade/components-native';
<Divider />
<Divider thickness="lg" /> Platform status
| Platform / Area | Status |
|---|---|
| Design (Figma) | Beta |
| Web (React) | Beta |
| Native (React Native) | Beta |
| iOS (Swift) | Planned |
| Android (Kotlin) | Planned |
| Accessibility audit | Planned |
Accessibility
Web
- Always
role="presentation"andaria-hidden="true"— completely invisible to assistive technology.
React Native
- Always
accessibilityElementsHiddenwithimportantForAccessibility="no-hide-descendants".
Known gaps
- Neither
colorBorderDefaultnorcolorBorderStronghas an inverse-surface counterpart token, soDividerdoes not vary bySurfacetone.
No releases yet.