Custom attributes
To add a custom attribute, such as "alt", to a source, use the "customAttributes" array prop:
<FsLightbox
toggler={toggler}
sources={["/Images/1.jpg", "/Images/2.jpg"]}
customAttributes={[
{
alt: "A first example description."
},
{
alt: "A second example description."
}
]}
/>
Any attribute can be added:
<FsLightbox
toggler={toggler}
sources={["/Image.jpg"]}
customAttributes={[
{
alt: "An example description.",
foo: "bar"
}
]}
/>
<!-- The rendered source -->
<img src="/Image.jpg" alt="An example description." foo="bar">