Custom attributes
To add custom attributes such as e.g. alt, poster 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'
}
]"
/>
: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">
<img src="first.jpg" alt="Example first image description">
<!-- Second source -->
<img src="second.jpg" alt="Example second image description" foo="bar">