The lightbox library allows users to zoom in/out, rotate, download and view images/videos in fullscreen mode. With its gallery support, users can navigate through images/videos using next/previous navigation or by clicking on thumbnails.
1. Download the Magniview library from our website or use your preferred package manager:
# Yarn $ yarn add magniview # NPM $ npm install magniview
2. Add Magniview’s JavaScript and CSS files to your HTML:
<link rel="stylesheet" href="./dist/magniview-min.css"> <script src="./dist/magniview-min.js"></script>
// OR import 'magniview/dist/magniview-min.js'; import 'magniview/dist/magniview-min.css';
3. Create a single image/video lightbox:
<div data-magniview=""> <img src="image.jpg" alt="Image Alt"> ... or a video </div>
4. Create a gallery lightbox. All images/videos within the gallery must share the same data-gallery value:
<div data-gallery="galleryExamp" data-magniview=""> <img src="image1.jpg" alt="Image Alt 1"> </div> <div data-gallery="galleryExamp" data-magniview=""> <img src="image2.jpg" alt="image Alt 2"> </div> <div data-gallery="galleryExamp" data-magniview=""> <img src="image3.jpg" alt="image Alt 3"> </div>
v1.0.12 (08/01/2025)
v1.0.10 (01/30/2025)
v1.0.9 (01/15/2025)
v1.0.8 (10/18/2024)
10/15/2024
The post Lightweight JavaScript Lightbox For Enhanced Image/Video Viewing – Magniview appeared first on CSS Script.
Today's links Don't Be Evil: Evil genius is just a lack of shame. Hey look…
Brain twins where regions are allowed to compete for resources behave more like the real…
Staff report Bloomington, Ind. – April 11, 2026 Braydon Blake, a 28-year-old man charged in…
Staff report Bloomington, Ind. – April 11, 2026 Braydon Blake, a 28-year-old man charged in…
FRACKVILLE – Springtime means it’s time for baseball. Frackville Little League kicked off the season…
HAZLETON – Hundreds came out to downtown Hazleton to see and pick from more than…
This website uses cookies.