Skip to content

Separator

partialkit

Components for plain HTML.


Blog
Docs
Source
<hr class="separator" />
<hr class="separator" data-orientation="vertical" />
AttributeMeaning
data-orientation="vertical"A vertical rule that stretches to its container

A vertical separator needs a parent with a height — it stretches to fill, and has nothing to fill in a container only as tall as its text.

Set dir="rtl" on the page or on any subtree — padding, corners and positions follow the reading direction on their own. See the button page for a live example.

A rule between groups of controls is meaningful and should stay an <hr>. A line used as decoration inside one control is not, and should be hidden from assistive tech.