About
Retrieved knowledge chunks for RAG interfaces: title, size, excerpt and a source file chip, revealed in sequence.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Context Cards to your project and fits it to your theme.
Code
How Context Cards is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import ContextCards, { type ContextChunk } from "@/components/ui/context-cards";
/* all content lives here; the component only renders what it is given */
const CHUNKS: ContextChunk[] = [
{
title: "Data retention policy",
meta: "312 characters",
body: "Customer event logs are kept for 90 days on the Pro plan and 13 months on Enterprise, then purged from all regions.",
source: "Security & Compliance.pdf",
badge: "PDF",
tone: "red",
href: "#",
},
{
title: "Plan usage export",
meta: "1,180 characters",
body: "Q3 seats by plan: Pro 4,812 (+9%), Team 1,906 (+4%), Enterprise 642 (+18%); 37 accounts over their event quota.",
source: "usage-by-plan-q3.csv",
badge: "CSV",
tone: "green",
href: "#",
},
];
export default function ContextCardsDemo() {
return (
<div className="flex min-h-[520px] w-full items-center justify-center bg-background p-8">
<ContextCards heading="Retrieved chunks" count={32} chunks={CHUNKS} />
</div>
);
}
















