react-compare-image-slider
v0.1.15
Published
A simple interactive component for comparing two images
Downloads
18
Readme
react-compare-image-slider
A simple tool for comparing two images.
To use the react-compare-image-slider component in your code:
From your project folder, install the component from npm.
npm install react-compare-image-slider
Import the component.
In a JavaScript module:
import { ReactCompareImageSlider } from "react-compare-image-slider";
In an HTML page:
<script src="./path-to/react-compare-image-slider/build/index.umd.js"></script>
<script type="module">
import "./path-to/react-compare-image-slider/build/index.js";
</script>
Or:
<script
type="module"
src="./path-to/compare-image-slider/build/index.js"
></script>
Add the component to your application or component:
<ReactCompareImageSlider leftImage={leftImage} rightImage={rightImage} />