Pivot Docs

    Divider Open in Figma

    The Separator (aka Divider) component is a visual element that creates separation between different content sections, groups, or interface elements. Also commonly referred to as a separator, rule, or line divider, this component serves as a subtle yet effective option to organize hierarchy and improve scanability.

    pivot-divider is a simple horizontal rule component for visually separating content sections. It renders a semantic <hr> element with customizable spacing and color variations.


    Quick Start

    <!-- Default divider with 40px margin -->
    <pivot-divider></pivot-divider>

    <!-- Divider with reduced spacing (20px margin) -->
    <pivot-divider pivot-margin="20"></pivot-divider>

    <!-- Divider with no margin -->
    <pivot-divider pivot-margin="0"></pivot-divider>

    <!-- Inverse color divider, for use on dark backgrounds -->
    <pivot-divider pivot-version="inverse"></pivot-divider>

    pivot-margin and pivot-version can be combined freely, e.g. <pivot-divider pivot-margin="20" pivot-version="inverse"></pivot-divider>.


    Styling Best Practices

    • Use semantic spacing: Choose a pivot-margin value that matches the visual weight of the sections it separates.
    • Match background: Use pivot-version="inverse" on dark backgrounds and the default version on light backgrounds — the two variants set different background-color values on the rendered <hr> and are not interchangeable.
    • Keep it simple: The divider is intentionally minimal; avoid adding additional styling or content to it.

    Accessibility

    pivot-divider renders a bare <hr /> with no other markup. The <hr> element carries an implicit ARIA role of separator, so no explicit role or other ARIA attributes are needed for assistive technology to recognize it as a thematic break (WCAG 4.1.2).

    Screen Reader Behavior

    Screen readers announce the element as a horizontal rule or separator when encountered, signaling a thematic break between the surrounding content. No accessible name or description is associated with it.

    Keyboard Navigation

    pivot-divider is not interactive. It receives no keyboard handlers and responds to no keys.

    Focus Management

    The component does not participate in the tab order and never receives or manages focus — the native <hr> element is not focusable and pivot-divider adds no tabindex or focus behavior of its own.


    References


    API Reference

    Props

    Name Type Default Description
    pivot-margin 0 | 20 | 40 40 The margin spacing around the divider in pixels.
    pivot-version "default" | "inverse" "default" The color of the divider.

    CSS Custom Properties

    Name Description
    --component-divider-default Background color of the divider in the default color variant.
    --component-divider-inverse Background color of the divider in the inverse color variant.