About
AI-proposed table edits: removals struck through, additions highlighted, each change toggleable by click or keyboard before applying.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Diff Table to your project and fits it to your theme.
Code
How Diff Table is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import DiffTable, { type DiffRow } from "@/components/ui/diff-table";
/* all content lives here; the component only renders what it is given */
const ROWS: DiffRow[] = [
{ key: "legacy-sync", name: "legacy-sync", tag: { label: "Worker", tone: "neutral" }, detail: "us-east-1", change: "remove" },
{ key: "pdf-export", name: "pdf-export", tag: { label: "Lambda", tone: "warning" }, detail: "eu-west-2", change: "remove" },
{ key: "billing-api", name: "billing-api", tag: { label: "Service", tone: "primary" }, detail: "us-east-1", change: "keep" },
{ key: "usage-meter", name: "usage-meter", tag: { label: "Service", tone: "primary" }, detail: "us-east-1", change: "add" },
];
export default function DiffTableDemo() {
return (
<div className="flex min-h-[520px] w-full items-center justify-center bg-background p-8">
<DiffTable
title="Proposed service cleanup"
columns={["Service", "Type", "Region"]}
rows={ROWS}
onApply={(keys) => console.log("apply:", keys)}
/>
</div>
);
}
















