Fullscreen Lightbox Javascript Fullscreen Lightbox ,React Fullscreen Lightbox Vue Fullscreen Lightbox Vue

Vanilla JS Lightbox Documentation

Learn how to use the Vanilla JavaScript version of Fullscreen Lightbox.

Custom attributes

To add a custom attribute, such as "alt", to a source, add to the <a> element an attribute with the "data-" prefix:

<a data-fslightbox="gallery" data-alt="An example description." href="/Image.jpg">
Image
</a>

Any attribute can be added:

<a data-fslightbox="gallery" data-alt="An example description." data-foo="bar" href="/Image.jpg">
Image
</a>

<!-- The rendered source -->
<img src="/Image.jpg" alt="An example description." foo="bar">
Look over the Fullscreen Lightbox open source plug-ins.