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 OverflowGitHub
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
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
npm
npmjs.com › package › react-diff-viewer-continued
react-diff-viewer-continued - npm
Continuation of a simple and beautiful text diff viewer component made with diff and React. Latest version: 4.2.0, last published: a day ago. Start using react-diff-viewer-continued in your project by running `npm i react-diff-viewer-continued`. ...
» npm install react-diff-viewer-continued
Published Mar 10, 2026
Version 4.2.0
GitHub
github.com › praneshr › react-diff-viewer › issues › 166
React 18? · Issue #166 · praneshr/react-diff-viewer
June 1, 2022 - praneshr / react-diff-viewer Public · There was an error while loading. Please reload this page. Notifications · You must be signed in to change notification settings · Fork 314 · Star 1.6k · New issueCopy link · New issueCopy link · Open · Open · React 18?#166 ·
Author jchambers-ln
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^.
npm
npmjs.com › package › @alexbruf › react-diff-viewer
@alexbruf/react-diff-viewer - npm
April 30, 2025 - It is highly customizable and it supports almost all languages. React 18/19 Compatible · This version of @alexbruf/react-diff-viewer is compatible with React v18 and v19, utilizing functional components and hooks internally.
» npm install @alexbruf/react-diff-viewer
Published Apr 30, 2025
Version 3.1.5
Author Alex Brufsky
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.
npm
npmjs.com › package › react-diff-viewer
react-diff-viewer - npm
May 22, 2020 - 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.
» npm install react-diff-viewer
Published May 22, 2020
Version 3.1.1
Author Pranesh Ravi
Kyle-peacock
kyle-peacock.com › blog › react-diff
React Diff Viewer | Kai Peacock's website
May 23, 2020 - Technical and non-technical posts from Kai's blog. This blog is a bit of a digital garden.
CodeSandbox
codesandbox.io › examples › package › react-diff-viewer-continued
react-diff-viewer-continued examples - CodeSandbox
AboutContinuation of a simple and beautiful text diff viewer component made with diff and React558,855Weekly Downloads
GitHub
github.com › aeolun › react-diff-viewer-continued › issues
Issues · aeolun/react-diff-viewer-continued
A simple and beautiful text diff viewer component made with Diff and React. - Aeolun/react-diff-viewer-continued
Author Aeolun
GitHub
github.com › keploy › react-diff-viewer › blob › master › package.json
react-diff-viewer/package.json at master · keploy/react-diff-viewer
"description": "Continuation of a simple and beautiful text diff viewer component made with diff and React",
Author keploy
UNPKG
unpkg.com › browse › react-diff-viewer@3.1.0 › package.json
react-diff-viewer/package.json
A simple and beautiful text diff viewer component made with diff and React · github.com/praneshr/react-diff-viewer
CodeSandbox
codesandbox.io › s › j7lwqj0l63
react-diff-view-demo - CodeSandbox
January 30, 2020 - react-diff-view-demo by otakustay using antd, immer, lodash, react, react-diff-view, react-dom, react-scripts, unidiff
Npm
npm.io › search › keyword:diff-viewer
Diff-viewer | npm.io
A simple and beautiful text diff viewer component made with diff and React