Mobile-first Image Viewer In Vanilla JavaScript – previewImage-mobile

Category: Javascript , Modal & Popup , Recommended | August 16, 2019
Author:yanghuiLu
Views Total:969 views
Official Page:Go to website
Last Update:August 16, 2019
License:MIT

Preview:

Mobile-first Image Viewer In Vanilla JavaScript – previewImage-mobile

Description:

A mobile-first image viewer to showcase your images in a sliding panel with support for swipe to switch, pinch to zoom, tap to close and much more.

View The Demo On The Mobile:

Mobile-first Image Viewer In Vanilla JavaScript - previewImage-mobile QR Code

How to use it:

Import the minified version of the previewImage-mobile library into the document.

<script src="dist/previewImage.min.js"></script>

Prepare an array of images to showcase in the image viewer.

const imgList = ['1.png','2.png','3.png']

Initialize the image viewer and specify the first image to display as follows:

previewImage.start({
  urls: imgList,
  current: '1.png'
});

You Might Be Interested In:


Leave a Reply