Skip to Content
New: ssim-native brings SSIM, MS-SSIM and Hitchhiker's to Node, and interpret-native ships diff interpretation on its own. Read more β†’
DocsInteractive UI ComponentsReact

React Components

@blazediff/react renders a before/after comparison four ways: swipe, two-up, onion skin, and a live pixel diff. Every demo below is the real component, running in this page.

The components carry no styling of their own. They take *ClassName props and render from the @blazediff/ui headless engine, so you can restyle them freely or drop to the engine and render your own markup.

Installation

npm install @blazediff/react
import { SwipeMode } from "@blazediff/react"; // A draggable divider over two stacked images. position is 0 to 100. <SwipeMode src1="before.png" src2="after.png" onPositionChange={(position) => console.log(position)} />

Next

Last updated on