About
An inline edit hunk with tinted +/- rows, line numbers, and off-screen added/removed labels.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Claude Diff to your project and fits it to your theme.
Code
How Claude Diff is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { ClaudeDiff } from "@/components/ui/brainless-claude-diff";
export default function ClaudeDiffDemo() {
return (
<div className="w-full max-w-3xl overflow-x-auto border border-[#2b2b2b] bg-[#1a1a1a] p-5 text-[#c0caf5]">
<ClaudeDiff
file="lib/theme.ts"
summary="Updated lib/theme.ts with 2 additions and 1 removal"
lines={[
{ type: "ctx", n: 8, text: "export function resolveTheme() {" },
{ type: "del", n: 9, text: " return 'light'" },
{ type: "add", n: 9, text: " const stored = readStored()" },
{ type: "add", n: 10, text: " return stored ?? systemTheme()" },
{ type: "ctx", n: 11, text: "}" },
]}
/>
</div>
);
}








