I am trying to create a slider where the slides are moving slowly from right to left like a marquee.
I want the slides to pause moving when hovering, and I want the arrow buttons to work as a normal slider.
Basically, it’s a normal slider but with the marquee functionality of the elements moving and pausing on hover.
Is this possible? I can see that Syntheisa has done it somehow: https://www.synthesia.io/
(I have no live Webflow site)
Hey @tobias1! I have taken a look at the synthesia setup and it is essentially a slider with auto scroll, the pause on hover is handled with the code below.
Our Slider component is a Swiper object and we have full access to its API so this can be achieved with the component!
In case you’d like to give this a try, this is the component callback
<script>
window.fsComponents = window.fsComponents || [];
window.fsComponents.push([
'slider',
(sliderInstances) => {
console.log('slider Successfully loaded!');
// The callback passes a sliderInstances array with all the sliderInstance instances on the page.
const [sliderInstance] = sliderInstances;
console.log(sliderInstance);
// Each sliderInstance is a Swiper object - Now you can interact with Swiper's APIs.
// https://swiperjs.com/swiper-api#events
sliderInstance.on('slideChange', function () {
console.log('slide changed');
});
},
]);
</script>
I can also help with the code for this setup if you need! Just let me know!