Skip to main content

A separator element between groups of content, read by screen readers.

The separator is a single element, so the file named after its folder is the root (<ui:separator>). See Root or the Folder Name.

Read more about installing Components and Primitives.

A separator is horizontal by default. Style it through data-orientation="horizontal".

Order summary

3 items, shipped in 2 days

Set orientation to vertical for a separator between items side by side, as in the links at the top of this page. It renders aria-orientation="vertical" and data-orientation="vertical".

The following tables cover the available props of the Fluid Primitives. For a full list of available client side props and methods, see the Zag.js Machine API.

The separator. Renders a <div> element with data-orientation set to horizontal or vertical.

NameDescriptionRequiredDefault
orientationEnum\Orientation
The orientation of the separator.
No
Horizontal
attributesarray
Additional attributes that should be rendered on the component where ui:attributes is used.
No
[]
asChildboolean
If true the component uses its child only without the component template. Like Radix UI asChild or Base UI render props.
No
-
rootIdstring
The root ID of the component, used for hydration and identification.
No
-
idsarray
The IDs of of the component parts for composition.
No
[]
autoMountboolean
Whether the client initializes the component on its own. Set it to false to mount it yourself with `mount()`
No
true
classstring
The CSS class(es) to be applied to the component.
No
-