@img-comparison-slider/react
v8.0.2
Published
React wrapper for img-comparison-slider
Downloads
43,056
Readme
ImgComparisonSlider
React wrapper for img-comparison-slider component.
Usage examples: https://img-comparison-slider.sneas.io/examples.html
Installation
yarn add @img-comparison-slider/react
Usage
import { ImgComparisonSlider } from '@img-comparison-slider/react';
// ...
render() {
return (
<ImgComparisonSlider>
<img slot="first" src="https://img-comparison-slider.sneas.io/demo/images/before.webp" />
<img slot="second" src="https://img-comparison-slider.sneas.io/demo/images/after.webp" />
</ImgComparisonSlider>
);
}