Skip to content
GitHub (opens in a new tab)

InsightCard

A recommended insight or opportunity as a compact card, with tone and optional actions.

stableOrganismcontracts/insightcard.json

Preview

InsightCard

Recommended insight. Not Card. Not Scorecard. Not Alert.

Master

A medium opportunity card with confidence and source. Actions are kit Buttons, or text links with actionStyle="link" or an href. Variants shows every tone and size.

Insight
High confidence

Rebook no-shows automatically

Fill empty slots from the waitlist when clients cancel.

From last 14 days

Usage

InsightCard for a recommended action. Card for forms. Scorecard for one KPI. Alert for inline page status. One primary Button per view.

Do's

  • surface a recommendation, warning, or finding on a dashboard
  • next to Scorecards when the metric needs a suggested action

Don'ts

  • one KPI number — Scorecard
  • login/settings tile — Card
  • inline page status — Alert
  • toast — not in kit, ask
<InsightCard
  title="Rebook no-shows automatically"
  description="Fill empty slots from the waitlist when clients cancel."
  eyebrow="Insight"
  tone="opportunity"
  size="md"
  confidence="High confidence"
  source="From last 14 days"
  primaryAction={{ label: "Review", onClick: () => {} }}
  secondaryAction={{ label: "Not now", onClick: () => {} }}
/>

When to use

  • surface a recommendation, warning, or finding on a dashboard
  • next to Scorecards when the metric needs a suggested action

When not to use

  • one KPI number — Scorecard
  • login/settings tile — Card
  • inline page status — Alert
  • toast — not in kit, ask

What an agent reads

import { InsightCard } from "agentic-ds-kit";
must
  • title is h3 with useId
  • aria-labelledby
  • aria-describedby when description
  • tone icon aria-hidden
  • Dismiss is a button
  • An action with href is a real link (<a>); link-style onClick actions are buttons; the trailing arrow is aria-hidden
defaults
  • eyebrow Insight
  • tone opportunity
  • size md
  • actionStyle button
stops if
  • Do not invent local InsightCard, Insight, or RecommendationCard
  • Do not use raw hex
  • Do not put a metric as the title (that is Scorecard)
  • Actions are kit Buttons or the kit text link (href / actionStyle link); do not pass your own links or buttons
  • Do not make a navigating action a Button — give it href
  • Do not make the primaryAction a solid primary: inside a card it is outline neutral, and the page keeps its own one primary
  • Do not put block content, lists or controls in description; it is one or two sentences

From contracts/insightcard.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
titlestringYes——
descriptionstring | nodeNo—Text, or inline nodes such as a sentence with key numbers in <strong>. One or two sentences; no blocks, lists or buttons.
eyebrowstringNoInsight—
toneenumNoopportunityColors the tone icon. success (CircleCheck, icon-success) for good news that is done, e.g. a payment received. opportunity | success | warning | danger | info | neutral
sizesm | md | lgNomd—
confidencestringNo—e.g. High confidence
sourcestringNo—e.g. From last 7 days
primaryActionobjectNo—The main action: a kit outline neutral Button, last in the footer, or a text link when it has href or actionStyle is link. secondaryAction is a ghost neutral Button before it.
secondaryActionobjectNo—A kit ghost neutral Button before the primaryAction, or a text link when it has href or actionStyle is link.
actionStylebutton | linkNobuttonlink: actions render as text links ("View invoice →"): <a> with href, otherwise a button styled as a link. For alert tiles and quieter cards.
onDismissfunctionNo—text Dismiss control, not a Button cousin
  • Component
    →

    Scorecard

    one KPI with label, value, optional delta/trend/hint/badge

  • Component
    →

    Card

    Framed tile with optional header, body, and footer actions.

  • Component
    →

    Alert

    Inline status banner that stays on the page.

  • Block
    →

    Anomaly detail

    One metric anomaly an agent flagged, so a person understands it before anything is fixed.