Fragiola

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
Gallery

Behaviour

  • Semantic: role="separator" with its aria-orientation, in the accessibility tree.
  • Decorative: role="none", no aria-orientation: assistive technologies skip it.
  • Orientation: horizontal (the default) or vertical; your CSS draws it along data-orientation.

Anatomy

partelementdata-primitives-partrole
Separatordivseparator-rootthe 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

proptypedefaultdescription
orientation"horizontal" | "vertical""horizontal"the axis
decorativebooleanfalsehidden from assistive technologies (role="none")

State and part attributes

caseattributes
semanticrole="separator", aria-orientation ("horizontal" or "vertical"), data-orientation
decorativerole="none", data-orientation

Keyboard

None: a static separator is not focusable.

Exports

entryexports
@fragiola/primitives-react/separatorRenderProp, Separator, SeparatorProps, SeparatorState
@fragiola/primitives-vue/separatorRenderSlotProps, Separator, SeparatorProps, SeparatorState
@fragiola/primitives-angular/separatorSeparator, SeparatorOrientation, SeparatorState