Separator
A separator element accessible to screen readers.
Stencil boundary
fs-separator keeps its public host in Light DOM. The host owns the separator role,
orientation, dimensions, and consumer content; there is no internal drawing element
to isolate and no CSS part. Classes, inline styles, and ARIA attributes apply directly
to the host. The component does not add a Tab stop.
The Base UI theme is built in; select data-fs-theme="base-ui"
on an ancestor to enable the optional theme. The Hero uses a vertical separator;
consumers own its layout and can override --fs-separator-width and
--fs-separator-background-color. Host and child content remain accessible to
ordinary CSS selectors.
Anatomy
Import the component and use it as a single part:
API reference
orientationOrientation'horizontal'
- Name
- Description
The orientation of the separator.
- Type
- Default
'horizontal'
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | 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
data-orientation
Indicates the orientation of the separator.
Attribute | Description | |
|---|---|---|
data-orientation | Indicates the orientation of the separator. | |