Between groups
import { Separator, Text } from "@senvenli/react/display";
import { Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Stack space="space-200">
<Stack space="space-050">
<Text weight="medium">Billing address</Text>
<Text tone="subtle">12 St James's Square, London</Text>
</Stack>
<Separator />
<Stack space="space-050">
<Text weight="medium">Shipping address</Text>
<Text tone="subtle">Same as the billing address</Text>
</Stack>
</Stack>
);
}import { Separator } from "@senvenli/react/display";Examples
Vertical
Between items in a row; `decorative` hides a line that only decorates.import { Separator, Text } from "@senvenli/react/display";
import { Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Stack direction="horizontal" space="space-150" align="stretch">
<Text>12 orders</Text>
<Separator orientation="vertical" isDecorative />
<Text>3 customers</Text>
<Separator orientation="vertical" isDecorative />
<Text>$1,240.00</Text>
</Stack>
);
}With a label
For the alternative on an auth form, not for section titles.import { Button } from "@senvenli/react/action";
import { Separator } from "@senvenli/react/display";
import { Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<div className="max-w-sm">
<Stack space="space-200">
<Button iconBefore="key-round">Continue with single sign-on</Button>
<Separator>or continue with email</Separator>
<Button variant="primary">Continue with email</Button>
</Stack>
</div>
);
}Guidelines
When to use it
- Two groups of content need a visible boundary.
- An "or" between alternative sign-in methods.
Use something else when
- The groups are separate objects; give each its own card. Card
Do and avoid
- Prefer space over lines; add a separator only when space is not enough.
Accessibility
Built in
- Exposed as a separator with its orientation.
You provide
decorativewhen the line only decorates.
API reference
Separator
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | |
children | React.ReactNode | – | A label in the line ("or continue with email"), for auth forms only, not section titles. Always horizontal. |
isDecorative | boolean | – | Hides it from assistive tech when it only decorates. |
orientation"horizontal" | "vertical"Default"horizontal"childrenReact.ReactNodeA label in the line ("or continue with email"), for auth forms only, not section titles. Always horizontal.
isDecorativebooleanHides it from assistive tech when it only decorates.