react-before-after
v0.1.3
Published
Before After Component for React
Downloads
48
Maintainers
Readme
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