What this component does
This module turns a set of links into a gallery. Each item should have: a full-size file (for the lightbox) and a thumbnail/preview (for the page grid).
Component location
Files are located in src/components/layout/gallery.
Inside you’ll find:
- JS file with base settings / initialization.
- HTML example snippet.
assets/folder with LightGallery CSS files.
How to use
Add the attribute data-anim-gallery to the parent container that contains the gallery
items.
The module will auto-connect when it detects the attribute.
<div data-anim-gallery class="gallery">
...
</div>
Markup example
The typical structure is: a link to the full image, and inside it — an <img>
with the thumbnail.
<div data-anim-gallery class="gallery">
<a href="img/img-full-1.jpg" class="gallery__image">
<img alt="Preview" src="img/img-thumb-1.jpg" class="gallery__preview">
</a>
<a href="img/img-full-2.jpg" class="gallery__image">
<img alt="Preview" src="img/img-thumb-2.jpg" class="gallery__preview">
</a>
...
</div>
Download
Want a ready-to-use gallery workflow with clean structure and automated component connection? Download the template and plug the Gallery into your page in minutes.