Separator
A divider line that separates content, horizontally or vertically, with an optional label in the middle. It’s the same separator that structures the sections of these docs.
Layout · TaishoDS Core, in plain HTML.
Examples
One working example per case. Each example is the HTML of its preview—copy it as is, and with Core’s CSS and JS loaded, it looks and works the same.
Simple separator
Above the separator.
Below.
Separator with label
After one with a label.
Class reference
Every value of each modifier, with its HTML ready to copy.
Orientation
horizontal by default, or vertical with the vertical class to separate inline content.
When to use
- Two neighboring blocks cover different things, and spacing alone isn’t enough.
- You want to mark the break between long sections of a page.
- You need a label in the middle of the break (“or,” “More options”).
When not to use
- More breathing room between blocks is enough →
stackwith a largergap. - Each block already has its own surface →
card.
Do
- Use it between sections, not between every pair of elements.
- If it’s purely decorative, give it
role="none"so it doesn’t clutter the accessibility tree.
Don’t
- Don’t draw lines everywhere. Rhythm comes from spacing; a line is the exception.
TaishoDS Core
Doesn’t need JavaScript—it’s markup and CSS.
A horizontal or vertical rule.
From the CDN, without a build, load taisho.separator.css along with taisho.base.css. That file is all you need.
For how Core works in general, see Behavior.
Accessibility
- The example is decorative (
role="none"), so it isn’t announced. If the line separates meaningful content, removerole="none"from the<hr>(its implicit role isseparator).
Verification
What was actually tested. Anything that wasn’t tested says so—we’d rather say “not verified” than claim too much.
- axe WCAG 2.2 A + AA in a real browser, in light and dark mode, before every release.
- keyboard Adds no keys of its own—it uses the browser’s native behavior.
- screen reader Not verified with a screen reader. Test it in your own combination of components, not just here, where each one appears alone and on its happy path.