
lightGallery
Adds and configures a lightGallery lightbox in JS, React, Vue or Angular.
Install
npx skills add sachinchoolur/lightGallery --skill lightgallery -g -a claude-code -y- Repository
- sachinchoolur/lightGallery7.1k
- Category
- Design
- Updated
- 21d ago
- License
- GPL-3.0
- Context cost
- Mediumabout 1,934 tokens
- Runs scripts
- No, instructions only
What it does
Add or configure a lightGallery image/video lightbox or gallery in vanilla JavaScript, React, Vue or Angular, install, imports, plugins, CSS, settings, and the pitfalls that produce most bug reports. Use when a project needs a lightbox, photo gallery, thumbnail strip, zoomable images or a YouTube/Vimeo gallery, or when editing code that imports lightgallery or @lightgallery/*.
lightGallery
One gallery, four packages with the same features and settings:
| Stack | Package | Plugins import path |
|---|---|---|
| Vanilla JS / TypeScript | lightgallery | lightgallery/plugins/<name> |
| React | @lightgallery/react | @lightgallery/react/plugins/<name> |
| Vue 3 | @lightgallery/vue | @lightgallery/vue/plugins/<name> |
| Angular | @lightgallery/angular | @lightgallery/angular/plugins/<name> |
Plugin names: thumbnail, zoom, video, autoplay, fullscreen, share,
hash, rotate, pager, comment, mediumZoom, relativeCaption,
vimeoThumbnail, originCrop, justified. Each is a separate entry, import
only what the project uses.
Default recipe. Unless the user asks for something else, every image
gallery gets the zoom and thumbnail plugins, their two CSS files, and
lgSize: 'WIDTH-HEIGHT' (data-lg-size in markup) on every image item.
lgSize is the natural size of the full image; it drives the
zoom-from-origin animation, where the slide opens from the clicked
thumbnail and closes back to it. Without it the slide fades in. Read the
dimensions from the image files, the image optimizer or the CMS rather than
dropping the field. Leave a plugin out only when told to.
Two rules that prevent most problems
- CSS is a consumer import in every stack. The framework packages ship
no CSS. Import
lightgallery/css/lightgallery.cssplus one file per plugin (lightgallery/css/lg-thumbnail.css,lg-zoom.css, …), orlightgallery/css/lightgallery-bundle.cssfor everything. - Plugins are opt-in. A feature only exists when its plugin is passed
(
plugins: [...],plugins={[...]},:plugins="[...]",[features]="[withX()]"). Its settings are ignored otherwise.


