Divider
A line between things, across or upright; with a word in the middle when it separates two ways of doing the same thing.
import { Divider } from '@sypnia/ui/react'
Across, with a word, upright
or
Rows
Columns
API
Columns
API
Code
import { Button, Divider } from '@sypnia/ui/react';
export default function Kinds() {
return (
<div className="sy-stack" style={{ '--gap': 'var(--s-4)', maxWidth: '24rem' } as React.CSSProperties}>
<Button variant="primary" block>Continue with email</Button>
<Divider label="or" />
<Button block>Continue with GitHub</Button>
<Divider />
<div className="sy-row" style={{ alignItems: 'stretch' }}><span>Rows</span><Divider vertical /><span>Columns</span><Divider vertical /><span>API</span></div>
</div>
);
} When to use it
Use it when
- Between two ways to sign in («or»), between groups in a row.
Do not use it when
- Between every item of a list: spacing already separates them.
For everyone
- It is a separator; upright ones say so.
Props
| Divider | Type | Default |
|---|---|---|
className | string | |
label | ReactNode | |
vertical | boolean |