Prodular UI

Sources

AI

Citations for generated answers: numbered inline chips with a preview card, and a collapsible list of every source used.

npx prodular-ui add sources

Inline citations

Numbered chips after the claim they support. Hover or focus one to preview the source.

Marketplace fees should be booked net. Ledgerline acts as an agent because it never controls the partner service before it reaches the customer1, and the fee policy confirms partners set their own prices2. Hover a number to preview the source.

Sources list

A row of favicons and a count that expands into the full list, in citation order.

Anatomy

<Sources>  <SourcesTrigger sources={sources} />  <SourcesContent>    {sources.map((s, i) => <Source key={s.url} source={s} index={i + 1} />)}  </SourcesContent></Sources>

Guidance

Use it when

  • Whenever an answer relies on retrieved documents, records or web pages.
  • Inline citations right after the sentence they support, and the Sources list once under the answer.

Avoid

  • Citing the model itself or sources it did not read.
  • More than three citations on one sentence. Cite the strongest one.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Number citations from 1 in the order they first appear, and list Sources in the same order so numbers match.
  • Only cite sources that the tool calls actually returned. Never generate URLs, titles or snippets.
  • Inside Response, pass sources to Response and keep [1] markers in the text instead of rendering Citation yourself.
  • Give each source a title and url. Add siteName for internal tools (Cost Explorer, Notion) and snippet with the exact supporting passage.
  • Render the Sources list after the answer finishes streaming, not while it streams.

API

Citation

PropTypeDefaultDescription
indexnumberOne based number shown in the chip.
sourceSourceData{ title, url, snippet?, favicon?, siteName? }

SourcesTrigger

PropTypeDefaultDescription
sourcesSourceData[]The first four favicons are stacked in the trigger.
countnumbersources.lengthTotal shown in the label.

Source

PropTypeDefaultDescription
source / indexSourceData, numberOne row in the expanded list.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add sources# or, with the registry in components.jsonnpx shadcn@latest add @prodular/sources