Press "Enter" to skip to content

A Simple Vanilla JavaScript Image Slideshow | vshowbox

vShowBox is a simple library of vanilla Javascript that helps you create and display your photo slideshow in a responsive lightbox popup window.

automatic image slider in html css, image slider in modal popup, modal image gallery javaScript, multiple image popup on click, bootstrap modal on image click

How to make use of it:

1. Download and install the VSHOWBOX library.

# Yarn
$ yarn add vshowbox
$ npm install vshowbox --save

2. Import VSHOWBOX into your module.

// ES 6
import vShowBox from 'vshowbox';
// CommonJS:
const vShowBox = require('vshowbox');

3. For browsers, join the following JavaScript and CSS files on the page.

<link rel="stylesheet" href="dist/vshowbox.css">
<script src="dist/vshowbox.js"></script>

4. Initialize the vShowbox.

const vshowbox = window.vShowBox.init();

5. Create photos on the web page.

<section class="sb-previews">
  <div class="sb-preview" style="background-image: url('1.jpeg')" title="Img 1"></div>
  <div class="sb-preview" style="background-image: url('2.jpeg')" title="Img 2"></div>
  <div class="sb-preview" style="background-image: url('3.jpeg')" title="Img 3"></div>
  <div class="sb-preview" style="background-image: url('4.jpeg')" title="Img 4"></div>
  <div class="sb-preview" style="background-image: url('5.jpeg')" title="Img 5"></div>

6. Create a slideshow modal.

<section class="sb-modal">
  <span class="sb-slide-count btn"></span>
  <span class="sb-close btn">&times;</span>
  <div class="sb-stage">
    <div class="sb-caption"></div>
    <span class="sb-prev btn">&#10094;</span>
    <span class="sb-next btn">&#10095;</span>

responsive slideshow model, vshowbox Plugin/Github

See Demo And Download

Official Website(vipranarayan14): Click Here

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

Be First to Comment

    Leave a Reply

    Your email address will not be published.