Citation Verification

Each claim in an answer beside the evidence, with a verdict a person can set.

PROGet Citation Verification and 168 other Pro components with pro lifetime — Get Pro

Category
RAG & Evals
Access
Pro
Source
406 lines · one file
States
6 drawn
Added
12 Oct 2026

The decision inside it

Who decided is shown next to what was decided

A model's check is labelled "Suggested by a model, not checked" and counted as still needing a person, so an automatic verdict is never read as a human one.

When to use it

Use Citation Verification to review an AI answer claim by claim: each claim with its evidence excerpts, a verdict (supported, partly, unsupported, conflicting) and a reviewer note. It moves to the next unreviewed claim after a verdict.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Citation Verification for this.
Install it: npx shadcn@latest add @liro/citation-verification
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/citation-verification.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/review-claims.tsx
import { CitationVerification, type VerifiableClaim } from "@/components/ui/citation-verification";

const claims: VerifiableClaim[] = [
  {
    id: "1",
    text: "Annual plans can be refunded within 14 days.",
    status: "unreviewed",
    evidence: [{ id: "e1", sourceTitle: "Refund policy", excerpt: "Annual plans may be refunded within 14 days of purchase.", page: 2 }],
  },
];

export function ReviewClaims({ saveVerdict }: { saveVerdict: (claimId: string, status: VerifiableClaim["status"]) => void }) {
  return <CitationVerification claims={claims} onStatusChange={saveVerdict} />;
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
claimsVerifiableClaim[] Yes–
selectedClaimIdstring NoControlled selection.
defaultSelectedClaimIdstring No–
onClaimSelect(id: string) => void No–
onOpenSource(evidence: CitationEvidence, claim: VerifiableClaim) => void NoOpen a source yourself. Without it, an http(s) `sourceUrl` opens in a new tab.
onStatusChange(claimId: string, status: ClaimStatus) => void | Promise<void> NoA reviewer set a verdict. Return a promise to show it saving; reject to show the error.
onReviewerNoteChange(claimId: string, note: string) => void | Promise<void> NoA reviewer saved a note. Same promise behaviour.
readOnlyboolean NoHide the reviewing controls: for people who may read but not decide.
advanceOnVerdictboolean NoAfter a verdict saves, move to the next claim still to review. Stays put when the save fails or nothing is left. Default true.
titleReact.ReactNode NoTitle over the list. Default "Claims".
lookLook NoLayered sets it in a tray, the heading above the card and the status in the strip below. Flat is one card.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-themebadgebuttonstatetextarea

States

All of them are drawn by the component. None is left for you to design.

  • To review
  • Supported
  • Conflicting
  • No evidence
  • Saving
  • Note failed

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances