New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vanilla-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-lightbox

Vanilla Lightbox

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-68.75%
Maintainers
1
Weekly downloads
 
Created
Source

Vanilla Lightbox

Introduction

Lightbox is small javascript library used to overlay images on top of the current page. It's a snap to setup and works on all modern browsers.
Supports all major browsers (Google Chrome, Firefox, Safari, IE 11, Edge)

Installation

Install package:
npm i vanilla-lightbox
Import package into your JS file as ES6 module:
import VanillaLightbox from 'vanilla-lightbox'
Use Vanilla lightbox:
const vanillaLightbox = new VanillaLightbox
Use Vanilla lightbox styles (scss):
@import "~vanilla-lightbox/src/scss/app.scss";
Now support:
  • Single Image lightbox
  • Gallery lightbox
  • Iframe lightbox
Images are loaded with lazyload on click
<!-- Gallery -->
<div class="lightbox" style="width: 100%">
    <a href="https://picsum.photos/600">
        <img src="https://picsum.photos/600" alt="Image" width="300">
    </a>
    <a href="https://picsum.photos/700">
        <img src="https://picsum.photos/700" alt="Image" width="300">
    </a>
    <a href="https://picsum.photos/800" class="lazy">
        <img src="https://picsum.photos/800" alt="Image" width="300">
    </a>
</div>

<!-- Single -->
<div class="lightbox" style="width: 100%">
    <a href="https://picsum.photos/600" class="lazy">
        <img src="https://picsum.photos/600" alt="Image" width="300">
    </a>
</div>

<!-- Iframe -->
<div class="lightbox iframe" style="width: 100%">
    <a href="https://www.youtube.com/embed/2MpUj-Aua48">
        <img src="https://picsum.photos/600" alt="Image" width="300">
    </a>
</div>

FAQs

Package last updated on 11 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc