Evidence Map

Claims and sources joined by what supports, contradicts or only gives context.

PROGet Evidence Map and 168 other Pro components with pro lifetime — Get Pro

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

The decision inside it

A link is a citation, not proof

Links drawn by a model are labelled unchecked, review status is kept separate from the links, and the copy never says a source proves a claim.

When to use it

Use Evidence Map to show how sources support or contradict claims: claims, sources and notes as boxes linked by supports, contradicts or contextualizes, with the selected item's details.

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 Evidence Map for this.
Install it: npx shadcn@latest add @liro/evidence-map
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/evidence-map.
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/evidence.tsx
import { EvidenceMap } from "@/components/ui/evidence-map";

export function Evidence() {
  return (
    <EvidenceMap
      nodes={[
        { id: "claim", kind: "claim", title: "Annual plans are refundable for 14 days", status: "supported" },
        { id: "policy", kind: "source", title: "Refund policy (PDF)" },
        { id: "faq", kind: "source", title: "Old billing FAQ" },
      ]}
      edges={[
        { id: "e1", source: "policy", target: "claim", relation: "supports" },
        { id: "e2", source: "faq", target: "claim", relation: "contradicts", note: "Says 7 days" },
      ]}
    />
  );
}

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
nodesEvidenceNode[] Yes–
edgesEvidenceEdge[] Yes–
selectedNodeIdstring | null No–
defaultSelectedNodeIdstring | null No–
onNodeSelect(node: EvidenceNode | null) => void No–
onOpenSource(node: EvidenceNode) => void NoOpen a source yourself. Without it, an http(s) `sourceUrl` opens in a new tab.
onStatusChange(claimId: string, status: EvidenceStatus) => void | Promise<void> NoAdds review buttons to claims. May return a promise.
layout"map" | "list" No`map` or `list`. The map turns into the list below 640px wide.
linkedBy"model" | "human" NoWho drew the links. Default "model": the details then say they are unchecked.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-themebadgebuttonsegmented-controlstate

States

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

  • Claim selected
  • Contradicted
  • No evidence
  • Not cited
  • Filtered
  • List view
  • Reviewing

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