Divider
A visual separator with optional centred label. Uses role="separator" for screen readers.
Preview
or continue with
LeftRight
Usage
import { Divider } from "anexui";
<Divider />
Copy codeWith label
<Divider label="or" />
<Divider label="Section title" />
Copy codeVertical
<div style={{ display: "flex", height: 40, alignItems: "stretch" }}>
<span>Left</span>
<Divider orientation="vertical" />
<span>Right</span>
</div>
Copy codeProps
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | "horizontal" \| "vertical" | "horizontal" | Stack direction of surrounding content |
| label | string | — | Optional text centred on the line |
All standard HTML <div> attributes are accepted.
Accessibility
role="separator"applied automaticallyaria-orientationmatches theorientationprop