Separator
A horizontal or vertical line between pieces of content.
Installation
Needs the arene setup first.
Install the packages it imports:
Set up the token layer and the StyleX compiler, if you have not already. See Installation.
Paste this source into the file named in its title.
Change the @/ imports if your project uses different aliases.
Usage
Vertical
orientation="vertical" draws the line from top to bottom. It stretches to the
height of the flex row it sits in.
Menu
Vertical separators divide a row of menu entries that each carry a description.
List
Horizontal separators divide the rows of a list.
- Version
- 2.4.0
- Released
- May 12, 2025
- License
- MIT
API reference
Pass render to replace a part's element or compose it with another component.
Separator wraps the Base UI Separator and accepts its props. See the
Base UI reference. It renders
a <div role="separator"> with aria-orientation set from the prop.
Separator
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" |
xstyle | StyleXStyles | — |
className | string | — |
separatorStyles
The style maps behind the component. Spread them onto any element.
| Key | What it is |
|---|---|
base | The fill and flex-shrink: 0 |
orientations | horizontal and vertical: the 1px thickness and the length |
Data attributes
| Attribute | On | Effect |
|---|---|---|
data-slot="separator" | the separator | Targets the rule from a parent |
data-orientation | the separator | Base UI writes it from orientation |