Pro
Sourced answer
An answer that shows where it came from: what was searched, the sources it read as numbered cards, and the answer with numbered markers. Point at a marker and its source lights up; choose a source and every claim that leans on it is marked.
pnpm dlx shadcn@latest add @caliper/sourced-answerWhen to use
Use it for
- Assistants and search that answer from documents or the web.
- Support answers drawn from a help centre, where people should check the source.
Skip it when
- Answers with no sources; a plain message is honest about that.
- A list of search results people browse themselves; use search results.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Sources before the answer
- The sources appear as soon as they are found and before a word of the answer, so people can see what it is built on while it is still being written.
- Markers and sources point at each other
- A marker lights its source card and scrolls it into view; a chosen source marks every claim that cites it. Checking an answer should never mean counting brackets.
- Never show half a marker
- While the answer streams, an unfinished “[1” is held back until it closes, so the text never flashes raw brackets.
Styling
- Numbers, not favicons, carry identity
- Each source is a number and its site in monospace; no third-party icons are loaded, so the card looks the same offline and in any theme.
Usage
- Pass plain text with markers
- Write the answer with [1] or [2, 3] where a claim is supported, and pass
shownwhile streaming; parsing and linking are done for you.
Installation
pnpm dlx shadcn@latest add @caliper/sourced-answer
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { SourcedAnswer } from "@/components/ui/sourced-answer"
The worked example comes with Pro
The 63-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
SourcedAnswer
component
Accessibility
It exposes status semantics, with aria-busy, aria-hidden, aria-label, aria-pressed, aria-describedby and aria-live kept in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- CitationsNumbered source references and a list of the sources behind an answer.
- Research sourcesA list of sources with relevance, excerpt and status.
- Agent statusOne line inside a reply that says what the agent is doing right now, thinking, searching, reading or writing, with what it is working on and a running clock, then settles into how long it took.