Description
Diffs, from Pierre, is an open-source library for rendering diffs and code in web applications. It is published as the npm package @pierre/diffs and built on Shiki for syntax highlighting and theming. Developers can render file diffs with several layouts, choose how changes are styled, and add custom or Shiki themes. Features include merge conflict resolution UI, comments and annotations, accept and reject changes, and line selection. The current version is 1.6.4. Edit mode is enabled with an EditProvider, that supports selection management, auto-indentation, undo history, find-in-file and lint markers. A beta called Highlights is described as a faster HTML generator for code and diffs, which the site says runs far faster than Shiki across its test files. Virtualization is included for large diffs. The docs include installation steps and a section for agents. The project is made by The Pierre Computer Company and has a public GitHub repository and a Discord community. It is aimed at developers building code review, AI coding and editor interfaces that need diff views.…
Highlights
- Open-source diff and code rendering for the web
- Shiki syntax highlighting and custom themes
- Edit mode with undo, find and lint markers
- Merge conflict UI, comments and line selection
Ratings & Reviews
No ratings yet
Be the first to rate diffs.
People also visit
diffs FAQ
What is @pierre/diffs?
An open-source library for rendering diffs and code in web apps. It is built on Shiki and can be installed with pnpm.
Is it open source?
Yes. The site describes it as an open-source library, and a public GitHub repository is linked from the site.
Can users edit code in it?
Yes. Edit mode can be enabled in any file or diff component with EditProvider, and includes undo history, find-in-file and lint markers.
Does it handle merge conflicts?
The site lists a merge conflict resolution UI, plus accept and reject controls for changes.
How do I install it?
Run pnpm add @pierre/diffs. The docs cover setup, themes and the component API.
What are the best diffs alternatives?
Popular alternatives to diffs include trees, react-code-compare and react-diff-viewer-continued. See all diffs alternatives











