Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 959 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 959 Bytes

Image Dragger

A simple, lightweight way to add an image comparison tool to your website/app

Installation

npm i image-dragger

Usage

import { ImageDragger } from 'image-dragger';

ImageDragger.create("#car", {
  leftImage: "./demo/images/car.jpg",
  rightImage: "./demo/images/car-bg-removed.png",
});

Parameters

Parameter Description
selector Selector of where you would like to mount the slider
options.leftImage URL of the image you would like to be on the left side of the slider
options.rightImage URL of the image you would like to be on the right side of the slider