About
A compact code file diff viewer showing added and removed lines with line numbers, a header filename, and add/remove counts.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds File Diff to your project and fits it to your theme.
Code
How File Diff is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import FileDiff from "@/components/ui/file-diff";
export default function Default() {
return (
<div className="flex min-h-[320px] w-full items-center justify-center p-8">
<div className="w-full max-w-md">
<FileDiff />
</div>
</div>
);
}








