Skip to content
Design System
GitHub

The sources a model's answer cites: numbered markers linked both ways to a numbered source list, each highlighting the other on hover or focus; [1] and [^1] in Markdown become markers.

Can Patrol dog 7F3A dock tonight?

Yes. The plate is clear and the box sits outside the approach corridor 12.

CheckResultSource
PlateClear of objects within 30 cm1
ApproachFrom the east, 1.2 m corridor2
Box40 cm west, outside the corridor2
  1. Leave the box where it is.
  2. If it must move, the night shift can take it before 22:00 3.
bash
ros2 topic echo /dock/state --once

Sources

  1. 1
    Docking station manual, section 4.2 (opens in a new tab)docs.example.com/manuals/dock/clearance

    Keep 30 cm clear on each side of the plate. Objects outside the approach corridor do not block docking.

  2. 2
    Aisle 4 floor plansite-maps/warehouse-b.pdf, page 12

    The dock in aisle 4 is approached from the east; the corridor is 1.2 m wide.

  3. 3
    Night shift handover, 25 Nov (opens in a new tab)wiki.example.com/ops/handover/2026-11-25

Answer

Install
npx shadcn add @syncrobotic/citations

Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/use-reduced-motion, @syncrobotic/button, @syncrobotic/section-header

Overview

When to use

  • An assistant that answers from manuals, maps or logs (retrieval), so an operator can check each claim.
  • A generated report that quotes its evidence.
  • Search answers that summarise several documents.

Use something else

  • Words that point at boxes or points on a picture: Grounded text.
  • A list of links with no text citing them: Grouped list or Item.
  • A footnote in a document people write: an ordinary link.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Locations

Streaming

Zh tw

Usage rules

  • For an answer built from documents (retrieval): each claim's sources as numbered markers in the text, and the list of them under the answer. Words that point at places on a picture are grounded-text.
  • Pass the sources in the order the model numbers them: [1] is the first. Put the answer and CitationSources inside one Citations; in Markdown, cite={citationMarker} turns [1], [^1] and [1, 2] into markers. A number with no source stays the text [N].
  • Give each source a title and an http(s) url, or a location (a file and page, a manual's section) when it is not a web page; a snippet is the passage the answer used, a sentence or two.
  • Neutral: the markers and their highlight are the kit's quiet fill and inverted number, never a colour per source. A title with a URL opens in a new tab with the external-link icon, and says so to screen readers.
  • Activating a marker moves focus to its source, which shows "Back to citation N"; that button or Esc returns to the marker. Keep the list on the same page as the answer, under it.
  • Inside StreamingText, wrap the StreamingText and the list in Citations and pass markdownProps={{ cite: citationMarker }}: the markers appear as the answer streams, and the reading leaves them out.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.
  • 0.51.02026-11-27Comments trimmed to what they need to say; the code is unchanged.

How to upgrade