Gathering detailed insights and metrics for lightgallery
Gathering detailed insights and metrics for lightgallery
Gathering detailed insights and metrics for lightgallery
Gathering detailed insights and metrics for lightgallery
A customizable, modular, responsive, lightbox gallery plugin.
npm install lightgallery
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.7
Supply Chain
98.4
Quality
81.7
Maintenance
100
Vulnerability
80.9
License
2.9.0-beta.1
Updated on Jun 15, 2025
Version 2.8.3 release
Updated on Mar 01, 2025
Version 2.8.2 release
Updated on Nov 28, 2024
Version 2.8.1 release
Updated on Nov 13, 2024
Version 2.8.0-beta.2 release
Updated on Apr 25, 2024
Version 2.8.0-beta.1 release
Updated on Nov 27, 2023
TypeScript (71.98%)
JavaScript (12.97%)
SCSS (9.77%)
HTML (3.78%)
Vue (1.36%)
CSS (0.13%)
Total Downloads
11,873,805
Last Day
2,340
Last Week
61,229
Last Month
279,431
Last Year
3,559,044
NOASSERTION License
6,810 Stars
1,193 Commits
1,300 Forks
139 Watchers
15 Branches
79 Contributors
Updated on Aug 01, 2025
Latest Version
2.8.3
Package Id
lightgallery@2.8.3
Unpacked Size
6.39 MB
Size
1.20 MB
File Count
468
NPM Version
6.14.8
Node Version
16.14.2
Published on
Mar 03, 2025
Cumulative downloads
Total Downloads
Last Day
-6.3%
2,340
Compared to previous day
Last Week
-2.5%
61,229
Compared to previous week
Last Month
1.2%
279,431
Compared to previous month
Last Year
17.8%
3,559,044
Compared to previous year
No dependencies detected.
A customizable, modular, responsive, lightbox gallery plugin. No dependencies.\ Available for React.js, Angular, Vue.js, and typescript.
lightGallery is available on NPM, Yarn, Bower, CDNs, and GitHub. You can use any of the following method to download lightGallery.
NPM - NPM is a package manager for the JavaScript
programming language. You can install lightgallery
using the following
command
1npm install lightgallery
YARN - Yarn is another popular package manager for the JavaScript programming language. If you prefer you can use Yarn instead of NPM
1yarn add lightgallery
Bower - You can find lightGallery on Bower package manager as well
1bower install lightgallery --save
GitHub - You can also directly download lightgallery from GitHub
CDN - If you prefer to use a CDN, you can load files via jsdelivr, cdnjs or unpkg
First of all, include lightgallery.css in the <head> of the document. If you want include any lightGallery plugin such as thumbnails or zoom, you need to include respective css files as well.
Alternatively you can include lightgallery-bundle.css
which contains
lightGallery and all plugin styles instead of separate stylesheets.
If you like you can also import scss files instead of css files from the scss
folder.
1<head> 2 <link type="text/css" rel="stylesheet" href="css/lightgallery.css" /> 3 4 <!-- lightgallery plugins --> 5 <link type="text/css" rel="stylesheet" href="css/lg-zoom.css" /> 6 <link type="text/css" rel="stylesheet" href="css/lg-thumbnail.css" /> 7 8 9 <!-- OR --> 10 11 <link type="text/css" rel="stylesheet" href="css/lightgallery-bundle.css" /> 12</head>
Then include lightgallery.umd.js into your document. If you want to include any lightgallery plugin you can include it after lightgallery.umd.js.
1<body> 2 .... 3 4 <script src="js/lightgallery.umd.js"></script> 5 6 <!-- lightgallery plugins --> 7 <script src="js/plugins/lg-thumbnail.umd.js"></script> 8 <script src="js/plugins/lg-zoom.umd.js"></script> 9</body>
lightGallery supports AMD, CommonJS and ES6 modules too.
1import lightGallery from 'lightgallery'; 2 3// Plugins 4import lgThumbnail from 'lightgallery/plugins/thumbnail' 5import lgZoom from 'lightgallery/plugins/zoom' 6
lightgallery does not force you to use any kind of markup. you can use whatever markup you want. Here can find detailed examples of different kinds of markups.
If you know the original size of the media, you can pass it via
data-lg-size="${width}-${height}"
attribute for the initial
zoom animation.
But, this is completely optional.
1<div id="lightgallery"> 2 <a href="img/img1.jpg" data-lg-size="1600-2400"> 3 <img alt=".." src="img/thumb1.jpg" /> 4 </a> 5 <a href="img/img2.jpg" data-lg-size="1024-800"> 6 <img alt=".." src="img/thumb2.jpg" /> 7 </a> 8 ... 9</div>
Finally, you need to initiate the gallery by adding the following code.
1<script type="text/javascript"> 2 lightGallery(document.getElementById('lightgallery'), { 3 plugins: [lgZoom, lgThumbnail], 4 speed: 500, 5 licenseKey: 'your_license_key' 6 ... other settings 7 }); 8</script>
You'll receive a license key via email one you purchase a license More info
As shown above, you need to pass the plugins via settings if you want to use any lightGallery plugins.
If you are including lightGallery files via script tag, please use the same plugins names as follows.
lgZoom
, lgAutoplay
, lgComment
, lgFullscreen
, lgHash
, lgPager
,
lgRotate
, lgShare
, lgThumbnail
, lgVideo
, lgMediumZoom
lightGallery supports all major browsers including IE 10 and above.
If you want to use lightGallery to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Read more about the commercial license
If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3.
If you have any questions, suggestions, feedback, please reach out to contact@lightgalleryjs.com or DM me on twitter
No vulnerabilities found.