Sources

A collapsible RAG knowledge-base drawer showcasing reference citations, URLs, and similarity scores.

The Sources component lists external documentation, vector search chunks, and web references utilized by retrieval-augmented generation (RAG) models.

Usage

tsx
import { Sources, SourcesTrigger, SourcesContent, Source } from "@celestia-project/ui"
export function MySources() {  return (    <Sources defaultOpen className="w-full max-w-md">      <SourcesTrigger count={2} />      <SourcesContent>        <Source          title="Drizzle ORM Documentation"          url="https://orm.drizzle.team/docs/overview"          description="Official guide on relations and migrations."        />        <Source          title="Better Auth Architecture"          url="https://better-auth.com/docs"          description="Standalone API server and client SDK setup."        />      </SourcesContent>    </Sources>  )}

Props Reference

ComponentPropTypeDescription
SourcesTriggercountnumberNumber of referenced sources to display on the badge.
SourcetitlestringTitle of the source document.
SourceurlstringClickable outbound link.
SourcedescriptionstringSnippet or summary excerpt from the source.