Compares images, inspired by Github's image diff view modes.
npm install react-image-diff
http://cezary.github.io/react-image-diff/
import ImageDiff from 'react-image-diff';
const Component = ({original, altered}) => (
<ImageDiff before={original} after={altered} type="fade" value={.5} slider animation />
);after: string- url to after imagebefore: string- url to before imageheight: number- height in pixelswidth: number- width in pixelstype: string- type of image comparison (enum ofdifference | fade | swipe)value: number- decimal fraction used to compute transition between before and after imagesslider: boolean- add slider control under image to transition manuallyanimation : boolean | object- animate the transition of the images- animation config (set to
trueto simply use the defaults):start: number(defaults tovalue) - starting value of animated transitionend: number(defaults to 1) - ending value of animated transitionstep: number(defaults to 0.02) - animation stepdelay: number(defaults to 50) - milliseconds between animation steps
- animation config (set to
MIT

