Diff ViewPRO
Code changes from an agent, with removed lines collapsing once applied.
Code
1 file · 90 lines of TypeScriptPRO
Diff View is part of Pro
Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.
Motion notes
- Lines enter left to right with a fast stagger, like they're being written.
- Applying collapses the removed lines on the layout spring and fades out the add highlights.
- Colors come from the success and danger subtle tokens, so diffs read correctly in both themes.
Usage
Example
<DiffView filename="src/app.ts" lines={patch} applied={accepted} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| filename | string | — | File path in the header. |
| lines | { type: "add" | "remove" | "context", text }[] | — | The diff. |
| applied | boolean | false | Collapses removals. |