BlocksCitationsPanel
Citations Panel
Stacked source cards for grounded answers and research results.
CitationsPanel ships with a full API table, a copyable example, and accessibility notes.
Installation
Install the package once, then import CitationsPanel from its direct entry point or from the root.
bash
pnpm add @agent-ui/reacttsx
import { CitationsPanel } from "@agent-ui/react";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
tsx
import { CitationsPanel } from "@agent-ui/react"; <CitationsPanel sources={[ { title: "React docs", url: "https://react.dev" },]} />API reference
Every prop CitationsPanel accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| sources | { title; url; snippet? }[] | — | Citations to render. |
| className | string | — | Merged onto the panel. |
Use it with the rest of the library
CitationsPanel composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
5 lines · copy-ready