0.1.3 • Published 3 years ago

react-before-after v0.1.3

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

Installation

npm install --save react-before-after

Then, import package in the target component of yout react app:

import ReactBeforeAfter from 'react-before-after';

and finally, use it like this:

<ReactBeforeAfter 
   beforeSrc="before_image_src_here" 
   afterSrc="after_image_src_here" 
   // width="optional width in px - just write the number"
   // height="optional width in px - just write the number"/>

Important note: your before image and after image shoud have SAME RATIO (also same size preffered for better quality)

To Do

  • Vertical switch

Contribute

https://github.com/pouyajabbarisani/react-before-after