Components Layout
Divider
StableSeparates sections of content, optionally with a short label such as “or”.
Divider marks a change of topic between sections. It renders a native thematic break (<hr>), or a labelled separator when it carries text. Inside menus and toolbars, use the lighter Separator.
Overview
Signature details
Deployment settings
import { Divider, Text } from '@bindshq/stance-react';
export function Basic() {
return (
<div style={{ width: '100%' }}>
<Text size="sm">Signature details</Text>
<Divider />
<Text size="sm">Deployment settings</Text>
</div>
);
}Light, dark and high contrast
Every Stance component is designed and tested in all three appearance modes.
Signature details
Deployment settings
Signature details
Deployment settings
Signature details
Deployment settings
Import
import { Divider } from '@bindshq/stance-react';Platforms
Divider has native counterparts. They share Stance tokens and intent, and use each platform’s own controls and conventions. The live previews on this page are the web implementation.
import { Divider } from '@bindshq/stance-react';Examples
or
import { Button, Divider, Stack } from '@bindshq/stance-react';
export function Labelled() {
return (
<Stack gap={0} style={{ width: '100%', maxWidth: 360 }}>
<Button variant="outline" fullWidth>
Continue with Microsoft
</Button>
<Divider label="or" spacing={4} />
<Button fullWidth>Continue with email</Button>
</Stack>
);
}Subtle
Strong
Dashed
import { Divider } from '@bindshq/stance-react';
export function Variants() {
return (
<div style={{ width: '100%' }}>
<Divider tone="subtle" label="Subtle" labelPosition="start" />
<Divider tone="strong" label="Strong" />
<Divider variant="dashed" label="Dashed" labelPosition="end" />
</div>
);
}API reference
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | None | Text shown in the line. |
labelPosition | 'start' | 'center' | 'end' | 'center' | Label alignment. |
spacing | SpaceKey | 6 | Vertical margin. |
tone | 'subtle' | 'default' | 'strong' | 'default' | Line strength. |
variant | 'solid' | 'dashed' | 'solid' | Line style. |
Accessibility
- Unlabelled dividers are <hr> elements, announced as separators.
- Labelled dividers use role="separator" and expose their text.
- Lines become CanvasText in Windows forced-colours mode.
Usage guidelines
Do
- Use between distinct sections.
Don’t
- Use a divider under every heading; whitespace usually suffices.