lightgallery.js embeds responsive image and video galleries in web pages with touch, zoom, and modular plugins. It works without jQuery and accepts flexible HTML markup.
Overview
lightgallery.js is a client-side gallery and lightbox for showing images and videos on websites. It opens content in an overlay with navigation, optional captions, and support for multiple galleries on one page.
The design is modular: built-in pieces cover thumbnails, fullscreen viewing, zoom, sharing, embedded iframes, and hosted or HTML5 video from common providers. Developers enable or omit modules through configuration rather than loading one monolithic bundle.
Interaction covers mobile touch and swipe, desktop mouse drag, keyboard navigation, double-tap or double-click zoom to actual size, pinch zoom in newer generations, and optional virtual slides. CSS-driven transitions and responsive image handling, including srcset-style sources, keep layouts adaptable.
You add stylesheet and script assets, point initialization at your markup or a dynamic slide list, and tune appearance through settings and SCSS variables. Distribution options mentioned include package managers, CDNs, and module formats such as AMD, CommonJS, and ES modules.
Key features
- Responsive image and video lightbox
- Modular built-in plugins
- Touch swipe and mouse drag
- YouTube, Vimeo, and HTML5 video
- Animated thumbnails option
- Zoom and fullscreen modes
- Social sharing hooks
- Dynamic programmatic slide lists
Use cases
- Portfolio image galleries
- Embedded product photo viewers
- Video tour or demo pages
- Marketing sites needing lightboxes