Fullscreen Lightbox Javascript Fullscreen Lightbox React Fullscreen Lightbox Vue

Vanilla JS Lightbox Documentation

Official Fullscreen Lightbox guide!

Custom attributes

To add custom attributes such as e.g. alt add to <a> tags attributes with 'data-' prefix:

<a data-fslightbox="gallery" data-alt="Example image description" href="img.jpg">
Image
</a>

Lightbox will add alt attribute to source:

<img src="img.jpg" alt="Example image description">

You can add any attribute you want:

<a data-fslightbox="gallery" data-alt="Example image description" data-foo="bar" href="img.jpg">
Image
</a>

<!-- Rendered source -->
<img src="img.jpg" alt="Example image description" foo="bar">
Get connected wth us on social networks!