AI Components / Result Panel
Result Panel
Structured AI analysis panel with tabs (Summary/Data/Sources), impact driver bars, sorting, copy/export, and streaming.
ai-display v0.1.0
Playground
Examples
Full analysis
<ai-result-panel title="Q4 Revenue Analysis" confidence="91" collapsible style="max-width:520px;"></ai-result-panel> With sources
<ai-result-panel title="Market Research" confidence="78" style="max-width:520px;"></ai-result-panel> Streaming
<ai-result-panel title="Analyzing..." streaming style="max-width:520px;"></ai-result-panel> Import
import { AiResultPanel } from '@cognivo/components'; // Or tree-shake: import '@cognivo/components/ai-result-panel'; Per-component imports ship only that component (~8 kB gzip).
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | "AI Analysis" | Panel title |
explanation | string | — | Summary paragraph |
bullets | string[] | — | Key takeaway bullet points |
drivers | {factor, impact}[] | — | Impact drivers with bars |
confidence | number | — | Confidence percentage (0-100) |
collapsible | boolean | false | Enable collapse/expand |
streaming | boolean | false | Show streaming indicator |
Events
| Event | Detail | Description |
|---|---|---|
ai-result-export | {format, title, explanation, bullets, drivers} | Export clicked |
ai-result-copy | {content: string} | Content copied |