Skip to content

Divider

<loomi-divider> — a themeable content divider for separating layout regions horizontally or vertically.

Terminal window
npm install @loomidev/divider lit
import "@loomidev/divider";
<loomi-divider></loomi-divider>

Use label for simple text, or the default slot for richer content.

Account
<loomi-divider label="Today"></loomi-divider>
<loomi-divider color="primary">
<strong>Account</strong>
</loomi-divider>

Vertical dividers stretch to their parent height. Give the surrounding layout a height or let content define it.

Left panel
Right panel
<div style="display:flex;gap:1rem;min-height:8rem">
<section>Left panel</section>
<loomi-divider orientation="vertical"></loomi-divider>
<section>Right panel</section>
</div>

Vertical dividers can carry content too.

<loomi-divider orientation="vertical" label="or"></loomi-divider>
<loomi-divider label="Start" align="start"></loomi-divider>
<loomi-divider label="End" align="end" variant="dashed"></loomi-divider>
<loomi-divider label="Dotted" variant="dotted" thickness="2px"></loomi-divider>

For the library-wide baseline, see Foundations — Accessibility.

For the shared container and viewport rules, see Foundations — Responsive behavior.

For theme activation, token overrides, and contrast guidance, see Foundations — Dark mode.

AttributeDefaultDescription
orientationhorizontalhorizontal | vertical
label(blank)Simple divider text. The default slot takes precedence when present.
aligncenterContent alignment: start | center | end.
variantsolidRule style: solid | dashed | dotted.
colorgrayAny loomi color.
thickness1pxCSS length for the rule thickness.
spacing0.75remCSS length for the gap around divider content.
SlotDescription
(default)Content placed inside the component.
  • @loomidev/core