0.7.1 • Published 6 years ago

compare-image-component v0.7.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Compare Image Component

npm Travis Codecov David License

React component to compare images before and after. It can be used for comparison of compression quality or as a stand-alone component on the page.

Demo

Demo Image

Website

For more examples: storybook WIP

Features

  • Doesn't use clip
  • Responsive (native, without JS listeners)
  • Dependencies free
  • Custom slider
  • Custom responsive or high resolution images or even custom components
  • Set a slider position programmatically
  • Native and custom animations
  • Four different behavior (move, click, drag, static)
  • Mobile friendly
  • Well tested with 100% coverage WIP
  • Strong typed by TypeScript

Docs

<CompareImage
	firstImage="/path/to/image.jpg"
	secondImage="/path/to/image.jpg"
/>

CompareImage

propertyrequiredtypedefaultdescription
firstImageyesstring-first image url
secondImageyesstring-second image url
defaultPositionnonumber50default position of slider (percent)
SlidernoReact.Component-custom slider

Create a custom slider

WIP

Create a custom component

WIP

License

MIT