whatisgithub

What is lightgallery?

sachinchoolur/lightgallery — explained in plain English

Analysis updated 2026-06-24

7,014TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

JavaScript lightbox library that adds a fullscreen image and video gallery overlay to any web page, with plugins for zoom, thumbnails, autoplay, and YouTube or Vimeo playback.

Mindmap

mindmap
  root((lightGallery))
    What it does
      Fullscreen gallery overlay
      Keyboard and swipe nav
      Deep linking URLs
    Media types
      Images and responsive images
      YouTube and Vimeo
      HTML5 video
      iframes
    Plugins
      Zoom and rotate
      Thumbnails strip
      Autoplay
      Social sharing
    Frameworks
      Plain HTML
      React
      Vue
      Angular
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a fullscreen photo gallery to a portfolio or blog where clicking a thumbnail opens a lightbox overlay.

USE CASE 2

Embed YouTube and Vimeo video players as a fullscreen overlay on a landing page without navigating away.

USE CASE 3

Build a product image gallery with pinch-to-zoom and swipe gestures for a mobile e-commerce site.

USE CASE 4

Create a shareable photo gallery where each image gets its own deep-linked URL via browser history.

What is it built with?

TypeScriptJavaScriptCSS3ReactVueAngular

How does it compare?

sachinchoolur/lightgallerycomposiohq/agent-orchestratorsteel-dev/steel-browser
Stars7,0147,0157,020
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasyeasy
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Commercial projects with closed source require purchasing a paid license before going live.

Free for open-source projects released under GPL v3, commercial projects with private source code must purchase a paid license.

So what is it?

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.

Copy-paste prompts

Prompt 1
Using lightGallery, add a fullscreen image gallery to my React photo portfolio that supports pinch-to-zoom and swipe navigation on mobile.
Prompt 2
I want to embed YouTube videos in a lightGallery overlay on my Vue.js site. Show me the full setup including the video plugin configuration.
Prompt 3
Using lightGallery with just a CDN script tag and no build step, add a thumbnail strip and autoplay to a static HTML photo page.
Prompt 4
My lightGallery gallery needs deep-linked URLs so I can share individual photos. Show me how to enable the hash plugin and test it.

Frequently asked questions

What is lightgallery?

JavaScript lightbox library that adds a fullscreen image and video gallery overlay to any web page, with plugins for zoom, thumbnails, autoplay, and YouTube or Vimeo playback.

What language is lightgallery written in?

Mainly TypeScript. The stack also includes TypeScript, JavaScript, CSS3.

What license does lightgallery use?

Free for open-source projects released under GPL v3, commercial projects with private source code must purchase a paid license.

How hard is lightgallery to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is lightgallery for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.