API: components
Separator
A divider between sections of content or groups of controls, as the ARIA separator, or a decorative one that assistive technologies skip, in each framework.
A divider between sections of content or groups of controls (the ARIA
separator role, not focusable: a static
structure, not the APG's window splitter, which is
@fragiola/splitter's). A decorative divider, which means
nothing to assistive technologies, is decorative.
Profile card
Behaviour
- Semantic:
role="separator"with itsaria-orientation, in the accessibility tree. - Decorative:
role="none", noaria-orientation: assistive technologies skip it. - Orientation:
horizontal(the default) orvertical; your CSS draws it alongdata-orientation.
Anatomy
| part | element | data-primitives-part | role |
|---|---|---|---|
| Separator | div | separator-root | the separator, or none when decorative |
Usage
import { Separator } from "@fragiola/primitives-react/separator";
<nav>
<a href="#docs">Docs</a>
<Separator orientation="vertical" />
<a href="#blog">Blog</a>
</nav>
<Separator decorative />;Props
It also takes what the primitive contract gives: render
(Vue: as and the render slot), a class and a style, a ref, and any attribute, which it
forwards.
Separator
| prop | type | default | description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | the axis |
decorative | boolean | false | hidden from assistive technologies (role="none") |
State and part attributes
| case | attributes |
|---|---|
| semantic | role="separator", aria-orientation ("horizontal" or "vertical"), data-orientation |
| decorative | role="none", data-orientation |
Keyboard
None: a static separator is not focusable.
Exports
| entry | exports |
|---|---|
@fragiola/primitives-react/separator | RenderProp, Separator, SeparatorProps, SeparatorState |
@fragiola/primitives-vue/separator | RenderSlotProps, Separator, SeparatorProps, SeparatorState |
@fragiola/primitives-angular/separator | Separator, SeparatorOrientation, SeparatorState |