Separator
A line that divides content into groups.
A separator draws a thin line between two groups of content, so users see where one group ends and the next begins. A horizontal separator takes the full width of its parent, and a vertical separator sits in a flex or grid parent and stretches to the height of its row. The line has no margin of its own, so the gap of its parent sets the distance to the content. The separator reports its role and its orientation to assistive technology.
The warehouse ships the cases on Monday, and the store receives them on Tuesday.
Usage
Examples
Vertical
Content that sits side by side in one line, such as groups of actions in a toolbar, needs a division between its items rather than below them. With orientation set to "vertical", the separator divides neighboring items within a row and takes the height of that row, so users tell the groups apart at a glance. It also reports the vertical orientation to assistive technology.
API Reference
| Prop | orientation |
|---|---|
| Type | "horizontal" | "vertical" |
| Default | "horizontal" |
| Description | Sets the direction of the line and the orientation that the separator reports to assistive technology. Horizontal divides content that is stacked, vertical divides content that sits in a row. |
| Prop | render |
|---|---|
| Type | ReactElement | render function |
| Default | – |
| Description | Replaces the native element or composes the separator with another component. |