Categories: CSSScriptWeb Design

Lightweight JavaScript Lightbox For Enhanced Image/Video Viewing – Magniview

Magniview is a lightweight and easy-to-use JavaScript lightbox library that enhances the image- and video-viewing experience on your websites.

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.

Table of Contents

Toggle

How to use it:

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>

Changelog:

v1.0.12 (08/01/2025)

  • Display caption from aria-label

v1.0.10 (01/30/2025)

  • Improved mobile responsiveness and video handling

v1.0.9 (01/15/2025)

  • Added YouTube support and improved mobile layout

v1.0.8 (10/18/2024)

  • Added support for video playback

10/15/2024

  • Bugfixes

The post Lightweight JavaScript Lightbox For Enhanced Image/Video Viewing – Magniview appeared first on CSS Script.

rssfeeds-admin

Share
Published by
rssfeeds-admin

Recent Posts

Pluralistic: Don’t Be Evil (11 Apr 2026)

Today's links Don't Be Evil: Evil genius is just a lack of shame. Hey look…

16 minutes ago

How to Build Better Digital Twins of the Human Brain

Brain twins where regions are allowed to compete for resources behave more like the real…

20 minutes ago

Update: Suspect in deadly East Anderson Road fire arrested after release from hospital went unreported

Staff report Bloomington, Ind. – April 11, 2026 Braydon Blake, a 28-year-old man charged in…

25 minutes ago

Update: Suspect in deadly East Anderson Road fire arrested after release from hospital went unreported

Staff report Bloomington, Ind. – April 11, 2026 Braydon Blake, a 28-year-old man charged in…

25 minutes ago

PLAY BALL: Frackville Little League opens 2026 season

FRACKVILLE – Springtime means it’s time for baseball. Frackville Little League kicked off the season…

29 minutes ago

PHOTOS: ‘Tulip Takeover’ in downtown Hazleton

HAZLETON – Hundreds came out to downtown Hazleton to see and pick from more than…

29 minutes ago

This website uses cookies.