Try either "react-diff-view" or "react-diff-viewer".
The "react-diff-viewer" is quite simple to use/implement while the "react-diff-view" offers some more advanced features.
It's up to you, here the links: https://www.npmjs.com/package/react-diff-viewer https://www.npmjs.com/package/react-diff-view
Answer from Jamil Mammri on Stack Overflownpm
npmjs.com › package › react-diff-viewer
react-diff-viewer - npm
May 22, 2020 - A simple and beautiful text diff viewer component made with diff and React. Latest version: 3.1.1, last published: 6 years ago. Start using react-diff-viewer in your project by running `npm i react-diff-viewer`. There are 51 other projects in ...
» npm install react-diff-viewer
Published May 22, 2020
Version 3.1.1
Author Pranesh Ravi
GitHub
github.com › Aeolun › react-diff-viewer-continued
GitHub - Aeolun/react-diff-viewer-continued: A simple and beautiful text diff viewer component made with Diff and React. · GitHub
A simple and beautiful text diff viewer component made with Diff and React. - Aeolun/react-diff-viewer-continued
Starred by 212 users
Forked by 52 users
Languages HTML 76.3% | TypeScript 23.3%
CodeSandbox
codesandbox.io › examples › package › react-diff-viewer
react-diff-viewer examples - CodeSandbox
AboutA simple and beautiful text diff viewer component made with diff and React197,004Weekly Downloads
GitHub
github.com › praneshr › react-diff-viewer
GitHub - praneshr/react-diff-viewer: A simple and beautiful text diff viewer component made with Diff and React. · GitHub
Inspired from Github diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.
Starred by 1.6K users
Forked by 311 users
Languages TypeScript 96.3% | JavaScript 3.1% | Shell 0.6%
npm
npmjs.com › package › react-diff-view
react-diff-view - npm
July 24, 2025 - A git diff component to consume the git unified diff output.. Latest version: 3.3.2, last published: 8 months ago. Start using react-diff-view in your project by running `npm i react-diff-view`. There are 52 other projects in the npm registry using react-diff-view.
» npm install react-diff-view
Published Jul 24, 2025
Version 3.3.2
Author otakustay
Repository https://github.com/otakustay/react-diff-view
Top answer 1 of 2
8
Try either "react-diff-view" or "react-diff-viewer".
The "react-diff-viewer" is quite simple to use/implement while the "react-diff-view" offers some more advanced features.
It's up to you, here the links: https://www.npmjs.com/package/react-diff-viewer https://www.npmjs.com/package/react-diff-view
2 of 2
7
react-diff-viewer-continued might be what you are looking for since 'react-diff-view' is no longer having updates and is not compactable for react 18^.
GitHub
github.com › otakustay › react-diff-view
GitHub - otakustay/react-diff-view: A git diff component · GitHub
A git diff component. Contribute to otakustay/react-diff-view development by creating an account on GitHub.
Starred by 991 users
Forked by 89 users
Languages TypeScript 92.9% | Less 3.7% | CSS 2.1% | JavaScript 1.1% | Shell 0.2%
GitHub
github.com › praneshr › react-diff-viewer › tree › v2.0
GitHub - praneshr/react-diff-viewer at v2.0
Inspired from Github's diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.
Starred by 1.6K users
Forked by 314 users
Languages TypeScript 96.3% | JavaScript 3.1% | Shell 0.6% | TypeScript 96.3% | JavaScript 3.1% | Shell 0.6%
npm
npmjs.com › package › react-diff-viewer-continued
react-diff-viewer-continued - npm
A simple and beautiful text diff viewer component made with Diff and React.
» npm install react-diff-viewer-continued
Published Feb 07, 2026
Version 4.1.2
Mrwangjusttodo
mrwangjusttodo.github.io › git-diff-view
Git Diff View - High-Performance Diff Component for React, Vue, Solid & Svelte
A feature-rich, high-performance diff view component for React, Vue, Solid, and Svelte. GitHub-style UI with syntax highlighting, split/unified views, and SSR support.
GitHub
github.com › praneshr › react-diff-viewer › blob › master › src › styles.ts
react-diff-viewer/src/styles.ts at master · praneshr/react-diff-viewer
A simple and beautiful text diff viewer component made with Diff and React. - praneshr/react-diff-viewer
Author praneshr
GitHub
github.com › keploy › react-diff-viewer
GitHub - keploy/react-diff-viewer · GitHub
Starred by 8 users
Forked by 6 users
Languages HTML 66.5% | JavaScript 16.2% | TypeScript 15.8% | CSS 1.4% | Shell 0.1%
npm
npmjs.com › package › @alexbruf › react-diff-viewer
@alexbruf/react-diff-viewer - npm
April 30, 2025 - A simple and beautiful text diff viewer component made with diff and React. Latest version: 3.1.5, last published: 10 months ago. Start using @alexbruf/react-diff-viewer in your project by running `npm i @alexbruf/react-diff-viewer`. There are 4 other projects in the npm registry using @alexbruf/react-diff-viewer.
» npm install @alexbruf/react-diff-viewer
Published Apr 30, 2025
Version 3.1.5
Author Alex Brufsky
GitHub
github.com › MrWangJustToDo › git-diff-view
GitHub - MrWangJustToDo/git-diff-view: A Diff View component for React / Vue / Solid / Svelte / Ink, same as Github · GitHub
A Diff View component for React / Vue / Solid / Svelte / Ink, same as Github - MrWangJustToDo/git-diff-view
Starred by 666 users
Forked by 40 users
Languages TypeScript 88.2% | Svelte 7.3% | JavaScript 2.4% | CSS 1.4%