Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 926 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 926 Bytes

ImgComparisonSlider

npm package

React wrapper for img-comparison-slider component.

Usage examples: https://img-comparison-slider.sneas.io/examples.html

Example

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>
  );
}