DOCS
v0.4

AI Components / Source Graph

Source Graph

Perplexity-style source attribution panel with numbered footnotes, type badges (cg-badge), weight bars, expandable excerpts, and clickable links. Sorted by relevance.

ai-viz v0.4.0

Playground

Examples

RAG attribution (5 sources)
<ai-source-graph style="max-width:520px;"></ai-source-graph>
Minimal (2 sources)
<ai-source-graph style="max-width:420px;"></ai-source-graph>

Import

import { AiSourceGraph } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/ai-source-graph';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
sources {id, title, type, weight, url?, excerpt?}[] Source nodes (type: doc|web|database|api)
rounded "none" | "sm" | "md" | "lg" "lg" Border radius variant

Events

EventDetailDescription
ai-source-click {id, title, type, weight} Source clicked (toggles excerpt expand)