Skip to content

@pierre/diffs

An open source library for rendering diffs and code with split or stacked layouts.

diffs.com

@pierre/diffs website screenshot
Added
Price
Free

About

About @pierre/diffs

@pierre/diffs is an open source library from The Pierre Computer Company for rendering code and diffs. It supports split and stacked layouts built on CSS Grid and Shadow DOM, several ways to mark changed lines, inline word-level highlights, and Shiki or custom themes. Newer features include an edit mode and virtualization.

You add it as an npm package with pnpm and render it in your own interface, for example in a code review screen or a chat that shows file changes. Its annotation system lets you attach comments, CI output or accept and reject buttons to lines. It is a general library, so it fits next to shadcn/ui rather than being part of it.

@pierre/diffs features

6 features

  • Split and stacked diff layouts
  • Line selection with click and drag
  • Annotations for comments and CI output
  • Merge conflict resolution view
  • Token hover callbacks
  • Shiki and custom themes

Install @pierre/diffs

1 command

Terminal

$ pnpm add @pierre/diffs

What you can build with @pierre/diffs

3 use cases

  • Building a code review screen with inline comments
  • Showing accept and reject controls for AI-suggested edits
  • Rendering merge conflicts with a resolution picker

Pricing

Ship it with Pro

The directory is free. Pro adds 6,000+ blocks, 14 premium templates and the MCP server, so your AI editor installs them for you.

4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.

  • Secure checkout via Stripe
  • Code lives in your repo
  • Keep what you've shipped if you cancel
  • License terms

FAQ

Frequently asked questions

What @pierre/diffs is, how to install it, its license and its alternatives.

4.9 out of 5 from 150+ developers

Found your stack? Ship it.

6,000+ blocks, premium templates and MCP in every Pro plan. The directory stays free.

Get Pro