Skip to content
uifiles
Browse components
ChatComponent

Inline Citation

Inline citation badge for AI-generated text: a hostname pill such as "ai-sdk.dev +2" placed after a passage that opens a source card on hover, keyboard focus or a click/tap, containing a carousel of sources (title, URL, description, quote) with prev/next paging and an index. Use inside streamed responses to attribute claims to web or document sources.

pnpm dlx shadcn@latest add @uifiles/inline-citation

Citations in a paragraph

Hover or focus a citation badge to peek at the source card; click, tap or press Enter to pin it and move focus inside, where Tab reaches the arrows that page through several sources and Escape closes it.

Streaming responses render progressively, so the first token appears long before the model has finished. The hover cards in this registry are built on Base UI's Preview Card, which places open and close delays on the trigger.