New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-diff-image

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-diff-image

Zero-dependency component for multi-modal image comparison and review.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

react-image-diff

Zero-dependency React component providing different modes for diffing or comparing images. The image format is the same as that generated by jest-image-snapshot, a three part image with the order old-diff-new. All styles are inline for maximum portability.

Four image comparison modes

split

Drag a handle to view a split of old vs new

split

blend

Using a native input slider, fade the new image over the old

blend

pixel-diff

Show the diff image directly

pixel diff

side-by-size

Display both image side-by-size

side-by-side

Configuration

showOverlay

Generate a magenta overlay to highlight small changes.

overlay

showFullSize

By default the component will responsively fit the image into the container size. Set showFullSize to true to display the image at its full size.

full size

showDivider

Defaults to true. Shows an orange divider line between the old and new images in split mode. Set to false to hide.

no divider

hasPadding

Defaults to false. Adds padding around the images with a standard checkerboard pattern. Makes it easier to see the edges of the images.

padding

Building

npm run build

Demo

Since ImageDiff does not include any configuration controls, the demo is a simple showcase of the modes and options.

npm run demo:watch
# another terminal
npm run demo:serve
# open http://localhost:3000

Keywords

FAQs

Package last updated on 11 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc