Add a fullscreen photo gallery to a portfolio or blog where clicking a thumbnail opens a lightbox overlay.
Embed YouTube and Vimeo video players as a fullscreen overlay on a landing page without navigating away.
Build a product image gallery with pinch-to-zoom and swipe gestures for a mobile e-commerce site.
Create a shareable photo gallery where each image gets its own deep-linked URL via browser history.
Commercial projects with closed source require purchasing a paid license before going live.
LightGallery is a JavaScript library for adding an image and video gallery overlay to a web page. When a user clicks a thumbnail or image link, the gallery opens fullscreen and lets them navigate through the collection with keyboard, mouse, swipe, or touch gestures. This kind of overlay is called a lightbox, and lightGallery is one of the more feature-complete implementations of it. The library has no required dependencies and works with plain HTML, or with React, Vue, and Angular through dedicated wrappers. You install it via npm or include it from a CDN, add a CSS stylesheet, and call one JavaScript function pointing at the container element that holds your image links. From there, plugins extend the behavior: there are built-in plugins for thumbnails, zoom, video playback, social sharing, autoplay, keyboard navigation, and others. You include only the plugins you want. On the media side, it supports static images, responsive images, YouTube and Vimeo videos, Wistia videos, HTML5 video files, and HTML iframes. Images can be zoomed with pinch-to-zoom on touch screens or mouse scroll on desktops, rotated, and flipped. The gallery also supports deep linking through the browser history API, so specific gallery items can be shared as URLs. The visual transitions use CSS3 hardware-accelerated animations, with more than twenty transition styles available. The gallery is designed to work on touch devices including phones and tablets, with swipe-to-close support and drag navigation. Licensing has two tracks. For open-source projects released under the GNU GPL v3, the library can be used at no cost. For commercial projects where source code is kept private, a paid commercial license is required. The license key is passed as a configuration option when initializing the gallery.
← sachinchoolur on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.