Layout
Divider
Separator draws a line; Divider adds an optional centred label. Decorative by default, semantic on request.
import { Divider, Separator } from '@reactloom/ui';Examples
Labelled divider
or
import { Button, Divider, Stack } from '@reactloom/ui';
export default function Example() {
return (
<Stack gap="4" style={{ width: '100%', maxWidth: 340 }}>
<Button fullWidth>Continue with SSO</Button>
<Divider label="or" />
<Button fullWidth variant="secondary">Continue with email</Button>
</Stack>
);
}Vertical separators
import { HStack, Link, Separator } from '@reactloom/ui';
export default function Example() {
return (
<HStack gap="3" style={{ height: 20 }}>
<Link href="#docs">Docs</Link>
<Separator orientation="vertical" />
<Link href="#api">API</Link>
<Separator orientation="vertical" />
<Link href="#status">Status</Link>
</HStack>
);
}API reference
Separator props
| Prop | Type | Default |
|---|---|---|
orientation | 'horizontal' | 'vertical' | 'horizontal' |
decorativefalse exposes role="separator". | boolean | true |
Divider props
| Prop | Type | Default |
|---|---|---|
labelCentred text; read as plain text. | ReactNode | — |
Customization
Extracted from the component’s source on every build, so it matches the code. How the layers fit together is explained in Customization.
Divider
Renders Separator, so its hooks apply too.
State attributes
Target these in your CSS to style states without depending on class names.
| Attribute | Values |
|---|---|
[data-orientation] | horizontal · vertical |
Theme tokens it reads
--pl-color-border-default --pl-color-fg-muted --pl-font-size-sm
Separator
State attributes
Target these in your CSS to style states without depending on class names.
| Attribute | Values |
|---|---|
[data-orientation] | horizontal · vertical |
Theme tokens it reads
--pl-color-border-default
Accessibility
- Decorative separators are hidden from assistive technology.
Usage guidelines
Do
- Use whitespace before reaching for a line.
Don’t
- Don’t use a separator as the only cue between unrelated content.