Title: Swiper API
Hey @Chad! I have asked the team for clarification on both of the threads you’ve opened. I’ll get back to you
1 Like
Hey @Chad! Anything available on Swiper.js API docs is supported.
This includes adding the loading="lazy"
option.
2 Likes
how can i modify/extend the finsweet component to use this?
@Chad, as the Swiper documenation states:
To use lazy loading, we just need to set
loading="lazy"
on images and add preloader element.
Or you can use the Components API to manipulate the sliderInstance
with the Swiper.js API
<script>
window.fsComponents = window.fsComponents || [];
window.fsComponents.push([
'slider',
(sliderInstances) => {
// The callback passes a sliderInstances array with all the sliderInstance instances on the page.
const [sliderInstance] = sliderInstances;
console.log('slider Successfully loaded!', sliderInstance);
},
]);
</script>