Components
Separator
Horizontal divider line with an optional label between its two halves.
import { Separator } from "@openperf/deft";
<>
<Separator.Root />
<Separator.Root>or</Separator.Root>
</>;Label
| Children | Result |
|---|---|
| None | A 1px line. |
| Any value | The label in small muted text between two lines that share the remaining width. |
The plain line is chosen only when children is undefined. A conditional such as {showLabel && "or"} that yields false or null still renders the labeled form: two lines with nothing between them.
Separator is horizontal only. Between groups of a Menu or a Select, use Menu.Separator or Select.Separator.
API
Separator.Root declares no props of its own; native HTML attributes go to the rendered element.