A separator is a visual divider between two groups of content, e.g. groups of menu items or sections of a page.
API
| Name | Type | Default |
|---|---|---|
orientation | Orientation | Default: 'horizontal'
|
The orientation of the separator. | ||
elementType | string | Default: — |
The HTML element type that will be used to render the separator. | ||
style | CSSProperties | Default: — |
The inline style for the element. | ||
className | string | Default: 'react-aria-Separator'
|
The CSS className for the element. | ||
id | string | Default: — |
The element's unique identifier. See MDN. | ||
aria-label | string | Default: — |
Defines a string value that labels the current element. | ||
aria-labelledby | string | Default: — |
Identifies the element (or elements) that labels the current element. | ||
aria-describedby | string | Default: — |
Identifies the element (or elements) that describes the object. | ||
aria-details | string | Default: — |
Identifies the element (or elements) that provide a detailed, extended description for the object. | ||
slot | string | null | Default: — |
A slot name for the component. Slots allow the component to receive props from a parent
component. An explicit | ||
render | DOMRenderFunction | Default: — |
Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements:
| ||
Default className: react-aria-Separator