Dynamic Swiper: Control Speed

I want to use a Swiper to rotate through news articles from a database. Each slide would contain a card with a title, preview text and a read more button.

Do i just need to create one card and apply a repeater to it?

I assume this is something very easy but I just can't get my head around it. Maybe time for beer ...

Found my answer at the bottom of my first beer. So easy.

However, how can I control the speed of the Swiper? I can control transition speed but I'd like the swiper to stay focused a bit longer before going to next slide.

You can do this by setting the data-swiper-autoplay attribute on each slide like this:

<div class="swiper-slide" data-swiper-autoplay="5000">
    <img src="img/slides/slide1.jpg">
</div>

Assuming that you've enabled Auto Play on the swiper component.

1 Like

Thanks Max, that doesn’t seem to make any difference?

<div is="dmx-swiper" id="swiperFeature" effect="flip" auto-height="true" autoplay="true" data-swiper-autoplay="10000" loop="true" speed="1200" dmx-bind:slides="featured.data.query">

Argh, I had it applied to the swiper not he slide itself. Thanks Max!

1 Like

This is now available in the latest Swiper update.