Pivot Docs

    Card - Icon Open in Figma

    The Card - Icon Component provides a consistent way to display key features across products. It includes an icon, title, description, and call to action.

    pivot-icon-card is a card component that combines an icon, title, body text, and a required call-to-action. pivot-cta-label and pivot-cta-href are required — the entire card renders as a single link to pivot-cta-href, so every part of the card is clickable. It supports two surface styles (outlined and elevated), two alignment modes (center and left), and two layout modes (1-column and 2-column) to accommodate a wide range of content layouts.

    All content — icon, title, body, and CTA — is supplied via properties/attributes rather than slots; there is no default or named <slot> in the component.


    Quick Start

    <!-- Minimal card -->
    <pivot-icon-card
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Feature Title"
    pivot-body="A short description of this feature or topic."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    <!-- Elevated surface -->
    <pivot-icon-card
    pivot-surface="elevated"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Feature Title"
    pivot-body="A short description of this feature or topic."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    <!-- 2-column layout with left alignment -->
    <pivot-icon-card
    pivot-layout="2-col"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Feature Title"
    pivot-body="A short description of this feature or topic."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    CSS Parts

    Name Description
    card The card container; always an a element since a CTA is required
    icon The icon wrapper div around the img element
    content The text content wrapper div (title, body, CTA)
    title The title wrapper div
    body The body text wrapper div
    cta The call-to-action text wrapper div

    Surface Variants

    Outlined (default)

    The card renders a solid border using the --pivot-icon-card-border-color and --pivot-icon-card-border-width tokens. This is the default surface style.

    <pivot-icon-card
    pivot-surface="outlined"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Outlined Card"
    pivot-body="This card uses a border to define its boundary."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    Elevated

    The card renders a box shadow instead of a border, giving it a raised appearance above the page surface.

    <pivot-icon-card
    pivot-surface="elevated"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Elevated Card"
    pivot-body="This card uses a shadow to define its boundary."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    Alignment Variants

    Center (default)

    The icon, text, and CTA are all centered horizontally within the card. This is the default alignment and works well in equal-width grid columns.

    <pivot-icon-card
    pivot-align="center"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Centered Card"
    pivot-body="Content is centered within the card."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    Left

    The icon, text, and CTA are aligned to the leading (left) edge of the card. Use this variant when cards appear in a list or alongside left-aligned prose content.

    <pivot-icon-card
    pivot-align="left"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Left-Aligned Card"
    pivot-body="Content is aligned to the left edge of the card."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    Layout Variants

    1-Column (default)

    The card stacks the icon above the text content in a single column. This is the default layout.

    <pivot-icon-card
    pivot-layout="1-col"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Stacked Card"
    pivot-body="Icon appears above the title and body text."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    2-Column

    The icon is placed in a row beside the text content. Content is always left-aligned in 2-column layout regardless of pivot-align. Use this variant when horizontal space is available and a compact side-by-side presentation is preferred.

    <pivot-icon-card
    pivot-layout="2-col"
    pivot-icon-src="/icons/feature.svg"
    pivot-icon-alt="Feature icon"
    pivot-title="Side-by-Side Card"
    pivot-body="Icon appears to the left of the title and body text."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>

    Accessibility

    pivot-icon-card renders the card part as one native <a> element using pivot-cta-href. The entire card is therefore clickable and keyboard-operable without nested interactive elements.

    Screen Reader Behavior

    • The icon <img>'s alt text comes directly from pivot-icon-alt (WCAG 2.2 SC 1.1.1 Non-text Content). Set it to meaningful text when the icon conveys information not already in the title or body; set it to "" to hide a purely decorative icon from assistive technology.
    • Title and body render as plain text nodes with no heading semantics — screen readers announce them as static text, not as a heading level.
    • The entire card, including the visible CTA, is announced as one link with its accessible name taken from pivot-cta-label. Activating the CTA follows the same pivot-cta-href as activating any other part of the card.
    • Use a descriptive pivot-cta-label because screen reader users frequently navigate via a links list. Labels such as “Read more” or “Click here” are a poor experience even when surrounding card text provides context.
    <!-- Decorative icon — suppress from screen readers -->
    <pivot-icon-card
    pivot-icon-src="/icons/star.svg"
    pivot-icon-alt=""
    pivot-title="Featured Plan"
    pivot-body="Our most popular option for growing teams."
    pivot-cta-label="CTA Label"
    pivot-cta-href="/features"
    >
    </pivot-icon-card>
    <!-- ✅ Descriptive CTA label -->
    <pivot-icon-card
    pivot-icon-src="/icons/star.svg"
    pivot-icon-alt=""
    pivot-title="Accessibility Guidelines"
    pivot-body="Body text"
    pivot-cta-label="View WCAG 2.2 guidelines"
    pivot-cta-href="https://www.w3.org/WAI/WCAG22/quickref/"
    >
    </pivot-icon-card>

    <!-- ❌ Avoid non-descriptive labels -->
    <pivot-icon-card
    pivot-icon-src="/icons/star.svg"
    pivot-icon-alt=""
    pivot-title="Accessibility Guidelines"
    pivot-body="Body text"
    pivot-cta-label="Read more"
    pivot-cta-href="https://www.w3.org/WAI/WCAG22/quickref/"
    >
    </pivot-icon-card>

    Keyboard Navigation

    • The card is the only focusable/keyboard-operable element: Tab/Shift+Tab moves focus to and from it, and Enter activates it (native anchor behavior).
    • The icon, title, body, and visible CTA are part of the same link and do not create additional tab stops.
    • All keyboard handling is native <a> behavior; pivot-icon-card adds no key handlers.

    Focus Management

    pivot-icon-card does not manage focus programmatically. Focus follows the natural tab order of the page. The component uses delegatesFocus: true (inherited from PivotBase), so calling .focus() on the host element delegates focus to the card link.


    Related Components

    • Link — use when a standalone link is needed outside the card.

    References


    API Reference

    Props

    Name Type Default Description
    pivot-surface "outlined" | "elevated" "outlined" The surface style of the card. Allowed values: "outlined", "elevated"
    pivot-align "left" | "center" "center" The alignment of the card content. Allowed values: "left", "center"
    pivot-layout "1-col" | "2-col" "1-col" The layout of the card. "1-col" stacks all content vertically. "2-col" places the icon to the left with the text content on the right; always left-aligned.
    pivot-icon-src string "" The src URL of the icon image.
    pivot-icon-alt string "" The alt text for the icon image.
    pivot-title string "" The title text of the card.
    pivot-body string "" The body text of the card.
    pivot-cta-label string The label text for the call-to-action link. Required — do not leave empty.
    pivot-cta-href string The href URL for the call-to-action link. Required — do not leave empty.

    CSS Custom Properties

    Name Description
    --component-card-surface Background color of the card
    --component-card-card-inset Padding inside the card
    --component-card-gap Gap between card sections
    --component-card-radius Border radius of the card
    --pivot-icon-card-border-color Border color for outlined surface
    --pivot-icon-card-border-width Border width for outlined surface
    --pivot-icon-card-shadow Box shadow for elevated surface