Fullscreen Lightbox Javascript Fullscreen Lightbox React Fullscreen Lightbox Vue

React Lightbox Documentation

Learn how to use React version of Fullscreen Lightbox!

Custom attributes

To add custom attributes such as e.g. alt use customAttributes array prop like in example:

<FsLightbox
toggler={toggler}
sources={['img/first.jpg', 'img/second.jpg']}
customAttributes={[
{
alt: 'Example first image description'
},
{
alt: 'Example second image description',
foo: 'bar'
}
]}
/>

Lightbox will add attributes to sources:

<!-- First source -->
<img src="first.jpg" alt="Example first image description">

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