Press "Enter" to skip to content

Compare Before and After Images Comparison Slider | image-compare-viewer

image Compare Viewer is a responsive slider for comparing photos before and after rating, retouching, and everything else. Easy to navigate and fluid!

online image comparison slider, image comparison slider, jquery before after slider, image comparison slider github, before and after slider css, js image comparison

Features:

  • Responsive design.
  • Friendly touch.
  • Fluid mode to create a full-size image comparison viewer.
  • Supports both landscape and portrait orientations.
  • Smooth sliding.
  • It allows you to specify the starting point in init.

How to make use of it:

1. Install and download the library.

# NPM
$ npm install image-compare-viewer --save

2. Wrap your before/after photos into a content item.

<div id="example">
  <img src="before.jpg" alt="BEFORE" />
  <img src="after.jpg" alt="AFTER" />
</div>

3. Load the image comparison viewer files in HTML format.

<link href="dist/image-compare-viewer.min.css" rel="stylesheet" />
<script src="dist/image-compare-viewer.min.js"></script>

4. Configure the image comparison slider.

const element = document.getElementById("example");
const myViewer = new ImageCompare(element).mount();

5. Create a vertical image comparison slider.

const myViewer = new ImageCompare(element,{
      verticalMode: false
})
.mount();

6. Enable fluid mode to create a comparison bar for full-size images.

const myViewer = new ImageCompare(element,{
      fluidMode: true
})
.mount();

7. Determine the starting point.

const myViewer = new ImageCompare(element,{
      startingPoint: 75
})
.mount();

8. Specify whether to allow the user to compare before/after images with a mouse move.

const myViewer = new ImageCompare(element,{
      hoverStart: true
})
.mount();

9. Enable/disable the smooth sliding effect after dragging the slider.

const myViewer = new ImageCompare(element,{
      smoothing: true,
      smoothingAmount: 100
})
.mount();

10. Customize the appearance of the slider.

const myViewer = new ImageCompare(element,{
      controlColor: "#FFFFFF",
      controlShadow: true,
      addCircle: false,
      addCircleBlur: true
})
.mount();

Modern Lightweight Image Comparison Slider, image Compare Viewer Plugin/Github, side by side image slider


See Demo And Download

Official Website(kylewetton): Click Here

This superior jQuery/javascript plugin is developed by kylewetton. For extra advanced usage, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.