Insight stack
A ranked AI summary card: findings with a change and a Why? panel, a loading state and an all-clear state.
Install
Not exported from agentic-ds-kit. add copies the source into your app (components/patterns/insight-stack/) with this contract beside it. You own the copy: replace the demo findings in insight-stack-data.ts and keep the must lines. The single InsightCard stays the kit component for one finding.
Usage
What a copy keeps
The contract’s must lines: the kit look and accessibility. Ask before breaking one.
- Use kit components from agentic-ds-kit for anything the kit has; no local cousins (chips, meters, skeletons, buttons, rules)
- Semantic tokens only (agentic-ds-kit/tokens.css); no raw hex, no primitive --color-* ramps
- Signed changes use kit Delta with tone (goodWhen down where a rise is bad); unsigned amounts are tone-coloured text; no filled chips
- See all and Ask are outline neutral sm Buttons; no primary Button in this card
- Why? keeps aria-expanded / aria-controls and a named region; do not swap it for Accordion
- Loading has no X and no footer; the all-clear state stays in this card (not kit Empty)
- Status is never colour alone: Delta shows an arrow or Better / Worse, and amounts sit beside a written detail
Defaults you can change
- Three findings, the first one ranked with an info Count
- Lightbulb in the header, CircleCheck when all clear
- Footer right-aligned: See all, then Ask in Chat
Built from
Related
- Component
InsightCard
A recommended insight or opportunity as a compact card, with tone and optional actions.
- Component
Scorecard
one KPI with label, value, optional delta/trend/hint/badge
- Component
AgentInbox
A queue of what agents need from you: approvals, questions, failed runs and finished recaps.
- Component
Alert
Inline status banner that stays on the page.