Pivot Docs

    Callout Block

    pivot-callout-block is a display component for surfacing a single piece of key information — a metric, stat, or value — with optional overline and body text. It supports three surface styles, three sizes, and two prominence levels to suit a range of layout contexts.


    Quick Start

    <!-- Minimal — key label only -->
    <pivot-callout-block pivot-key-label="$4,200"></pivot-callout-block>

    <!-- With overline and body text -->
    <pivot-callout-block
    pivot-overline="Total Revenue"
    pivot-key-label="$4,200"
    pivot-body-text="Up 12% from last month"
    >
    </pivot-callout-block>

    <!-- Outlined surface, large size, primary prominence -->
    <pivot-callout-block
    pivot-surface="outlined"
    pivot-size="large"
    pivot-prominence="primary"
    pivot-overline="Active Users"
    pivot-key-label="18,340"
    >
    </pivot-callout-block>

    Surface Variants

    The pivot-surface attribute controls the background and border of the block.

    Value Appearance
    outlined Transparent background with a 1px border using the card border token
    flat Filled background using the primary block surface token
    neutral Filled background using the secondary (neutral) block surface token
    <pivot-callout-block
    pivot-surface="outlined"
    pivot-key-label="Outlined"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-surface="flat"
    pivot-key-label="Flat"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-surface="neutral"
    pivot-key-label="Neutral"
    >
    </pivot-callout-block>

    Size Variants

    pivot-size scales the key label text. Overline and body text sizes are not affected.

    <pivot-callout-block
    pivot-size="small"
    pivot-key-label="Small"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-size="medium"
    pivot-key-label="Medium"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-size="large"
    pivot-key-label="Large"
    >
    </pivot-callout-block>

    Prominence Variants

    pivot-prominence controls the color token applied to the key label, allowing it to carry more or less visual weight relative to surrounding content.

    <pivot-callout-block
    pivot-prominence="primary"
    pivot-key-label="Primary"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-prominence="secondary"
    pivot-key-label="Secondary"
    >
    </pivot-callout-block>

    Usage Examples

    Metric card with all fields

    <pivot-callout-block
    pivot-surface="outlined"
    pivot-size="large"
    pivot-prominence="primary"
    pivot-overline="Monthly Revenue"
    pivot-key-label="$128,400"
    pivot-body-text="↑ 8.2% vs last month"
    >
    </pivot-callout-block>

    Side-by-side metric row

    <div style="display: flex; gap: 16px;">
    <pivot-callout-block
    pivot-surface="neutral"
    pivot-overline="Users"
    pivot-key-label="18,340"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-surface="neutral"
    pivot-overline="Sessions"
    pivot-key-label="42,100"
    >
    </pivot-callout-block>
    <pivot-callout-block
    pivot-surface="neutral"
    pivot-overline="Bounce"
    pivot-key-label="34%"
    >
    </pivot-callout-block>
    </div>

    Key label only (minimal)

    <pivot-callout-block pivot-key-label="99.9%"></pivot-callout-block>

    Accessibility

    pivot-callout-block is a display-only component with no interactive behavior. It carries no implicit ARIA role beyond the semantics of its rendered content, and it does not set any role or aria-* attribute on itself or its rendered spans.

    Screen Reader Behavior

    Content is read in DOM order: overline → key label → body text. Screen readers announce each <span> in sequence as inline text. There is no heading or landmark role applied — the block is treated as plain content within its surrounding context. Because the overline, key label, and body text are all plain <span> elements with no grouping role or aria-labelledby/aria-describedby relationship between them, assistive technology has no programmatic way to associate the overline as a label for the key label (WCAG 2.2 — Info and Relationships, 1.3.1) beyond their shared reading order — see Meaningful Labels below.

    Keyboard Navigation

    pivot-callout-block has no keyboard interaction — it renders no focusable or interactive elements, so no key handlers apply.

    Focus Management

    pivot-callout-block is not interactive and is not focusable. It does not participate in keyboard navigation, and it does not call .focus()/.blur() on itself or any descendant.

    Meaningful Labels

    The pivot-key-label value alone may not be self-explanatory out of context. Always pair it with a descriptive pivot-overline or ensure the surrounding layout provides sufficient context so the value is understandable to all users, including those using assistive technology.

    <!-- ✅ Clear — overline gives context to the value -->
    <pivot-callout-block
    pivot-overline="Error rate"
    pivot-key-label="2.4%"
    >
    </pivot-callout-block>

    <!-- ⚠️ Ambiguous without surrounding context -->
    <pivot-callout-block pivot-key-label="2.4%"></pivot-callout-block>

    Color and Contrast

    The pivot-prominence and pivot-surface combinations use design tokens intended to meet contrast requirements (WCAG 2.2 — Contrast (Minimum), 1.4.3). Do not rely solely on color to convey the meaning of a metric — always include a label (overline or body text) so the information does not depend on color alone (WCAG 2.2 — Use of Color, 1.4.1).


    References


    API Reference

    Props

    Name Type Default Description
    pivot-size "small" | "medium" | "large" "medium" The size of the callout. Allowed values: "small", "medium", "large"
    pivot-surface "outlined" | "flat" | "neutral" "outlined" The surface style of the callout. Allowed values: "outlined", "flat", "neutral"
    pivot-prominence "primary" | "secondary" "secondary" The visual prominence of the callout. Allowed values: "primary", "secondary"
    pivot-overline string "" Optional overline text to appear above the key label
    pivot-key-label string "Key Label" The key label text of the callout
    pivot-body-text string "" Optional body text of the callout

    Slots

    Name Description
    default Default slot containing the overline, key label, and body text

    CSS Custom Properties

    Name Description
    --global-space-primitives-20 Padding for the callout block (default: 1.25rem)
    --component-block-radius Border radius for the callout block (default: 0.5rem)
    --component-block-value-color-1 Key label color when prominence is "primary" (default: rgb(0 113 71))
    --component-block-value-color-2 Key label color when prominence is "secondary" (default: rgb(0 68 42))
    --component-card-border-color Border color when surface is "outlined" (default: rgb(178 177 175))
    --surface-border-style Border style when surface is "outlined" (default: solid)
    --surface-border-width Border width when surface is "outlined" (default: 1px)
    --component-block-surface-1 Background color when surface is "flat" (default: rgb(255 255 255))
    --component-block-surface-2 Background color when surface is "neutral" (default: rgb(247 246 243))