Separator
A separator element accessible to screen readers.
View as MarkdownAnatomy
Import the component and use it as a single part:
Anatomy
import { Separator } from '@base-ui/react/separator';
<Separator />API reference
orientationOrientation'horizontal'
Orientation- Name
- Description
The orientation of the separator.
- Type
'horizontal' | 'vertical' | undefined- Default
'horizontal'
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | ((state: Separator.State) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: Separator.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: Separator.State, ) => ReactElement) | undefined
Additional Types
Separator.Props
Re-Export of Separator props as SeparatorProps
Separator.State
type SeparatorState = {
orientation: 'horizontal' | 'vertical';
}