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


  • 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 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" />

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

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

const myViewer = new ImageCompare(element,{
      fluidMode: true

7. Determine the starting point.

const myViewer = new ImageCompare(element,{
      startingPoint: 75

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

const myViewer = new ImageCompare(element,{
      hoverStart: true

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

const myViewer = new ImageCompare(element,{
      smoothing: true,
      smoothingAmount: 100

10. Customize the appearance of the slider.

const myViewer = new ImageCompare(element,{
      controlColor: "#FFFFFF",
      controlShadow: true,
      addCircle: false,
      addCircleBlur: true

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.

Related Posts


Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…


Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…


Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…


Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…


Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…


How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…