# praneshr/react-diff-viewer

A simple and beautiful text diff viewer component made with Diff and React.

Repository: https://github.com/praneshr/react-diff-viewer
Canonical: https://ross.abutalabs.com/products/react-diff-viewer
Homepage: https://praneshravi.in/react-diff-viewer/
Language: TypeScript
License: MIT
License Family: permissive
Topics: reactjs, diff, diff-viewer, code-compare
Last push: 2024-03-28T15:46:01+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2897, "days_push": 888, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1665, forks 311 (observed 2026-08-28T04:05:18.991458+00:00)

## What it is
A React component that renders text and code diffs in split or inline views, built on top of jsdiff. It supports word-level diffing, line highlighting, and customization of styles and themes.

## Use cases
- show code changes in a react app
- display side-by-side text diff component
- compare two versions of a file in the browser
- render github-style diff viewer in react
- highlight word-level changes between strings
- code review diff ui component

## When to choose
- you need a drop-in React component for displaying text or code diffs
- you want split or inline diff views with word-level highlighting
- you need a customizable, lightweight diff viewer inspired by GitHub's UI

## When to avoid
- you need to compute or parse diffs outside a React UI
- your project is not React-based
- you need full file-system or git repository diffing rather than string comparison

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, frontend-framework
- domain: frontend, web-development, developer-tools, version-control
- platform: cross-platform
- tags: react, diff-viewer, code-compare, react-component, syntax-highlighting, split-view, nodejs, web-server

## Member repositories
- praneshr/react-diff-viewer (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:18.991458+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:44:26.798986+00:00, confidence not recorded.
  - readme: https://github.com/praneshr/react-diff-viewer (fetched 2026-08-28T04:05:18.991458+00:00, sha f45b341f5efb)
  - homepage: https://praneshravi.in/react-diff-viewer/ (fetched 2026-08-29T11:16:53.020969+00:00, sha 554d53893e4b)
  - registry_npm: https://registry.npmjs.org/react-diff-viewer (fetched 2026-08-29T11:16:53.030092+00:00, sha b7cbae742315)
- Data as of 2026-08-30T08:39:29.467469+00:00.
