Skip to content
uifiles
Browse components
ChatComponent

Sources

Collapsible list of the sources an AI answer cited. Sources wraps a collapsible; SourcesTrigger shows "Used N sources" (singular for one) with a chevron; SourcesContent reveals Source links (book icon + title; absolute URLs open in a new tab). A Source without href renders as plain text. Use under an assistant message to surface citations from web-search or retrieval tool results.

pnpm dlx shadcn@latest add @uifiles/sources
Installs with

Under an answer

Collapsed by default; the trigger reveals the links the answer drew on. A source without a title is labeled with its hostname.

The AI SDK UI package ships a useChat hook that streams assistant messages into React state, and shadcn registries can host the components that render them.