Separator v0.1.0 Data display

Horizontal or vertical rule with proper separator semantics.

import { Separator } from "latticeui-react";

Examples

Horizontal and vertical

Above

Below

Docs
API
Blog
Show code
<p>Above</p>
<Separator />
<p>Below</p>

<div style={{ display: "flex" }}>
  <span>Docs</span>
  <Separator orientation="vertical" />
  <span>API</span>
</div>

Anatomy

These data-part attributes are a versioned public API - style and test against them; they will not change in a minor release.

PartElementStable selector
rootdiv[data-scope="separator"][data-part="root"]

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"
decorativebooleanfalseHides from assistive tech when purely visual.

Accessibility

Roles: separator

Styling

Override styles by targeting the stable selectors below from any unlayered CSS - it always beats the library's @layer latticeui styles, no !important needed.

[data-scope="separator"][data-part="root"] {
  /* your overrides */
}

State attributes: data-orientation