Skip to content
Get Pro

File Diff

A compact code-change surface with old and new line numbers plus live change counts.

Loading component preview…

Installation

Add the component source directly to your project.

pnpm dlx shadcn@latest add https://pastaui.com/r/file-diff.json

API reference

File Diff

File Diff properties
PropTypeDefaultDescription
filenamestringNames the changed file.
linesDiffLine[]Provides context, addition, and deletion rows.
additions / deletionsnumberderivedOverrides calculated change counts.