This is a (multiple allowed):
Swiper (in this case it works as a carousel) should loop back to the first slide after the the entire carousel has been played.
When fade effect enabled with autoplay, autoplay only loops through swiper slide once and it does not repeat after the last slide. Slide, cube and coverflow effect work as expected. Only fade effect has this behaviour.
What swiper version are you using ? @ngamanning
We had the same problem, but the reason was were using version 5.3.0 and we've started using .scss files. And we've imported only swiper.scss without explicitly importing other styles from swiper.
So to have effects-fade working we had to import that .scss files:
@import "~swiper/swiper";
@import "~swiper/components/effect-fade/effect-fade";
and then fade effect was working correctly :)
@marckraw We're using 5.3.0. The fade effect works but the autoplay on fade effect doesn't. I tried the SASS way you suggested and yet the autoplay still doesn't loop :-(
The fade effect does work with auto play. We had a transition declaration on the slider and that throws off the swiper transition. Removed the custom transition and everything is fine.
@marckraw, I'm using Swiper component for reactjs (v6.0.0) like this:
<Swiper slidesPerView={1} effect={"fade"} fadeEffect={{ crossFade: true }}> but fade effect is not applied.
I'm also importing these scss files:
import 'swiper/swiper.scss';
import 'swiper/components/effect-fade/effect-fade.scss';
And doesn't seem to work... am I forgetting something?
Btw, I'm using reactjs + typescript
EDIT - SOLUTION (In case someone is having the same issue): I needed to import import SwiperCore, { EffectFade } from 'swiper';
and use it like this: SwiperCore.use([EffectFade]); and fade affect is working now. 馃殌
Most helpful comment
What swiper version are you using ? @ngamanning
We had the same problem, but the reason was were using version 5.3.0 and we've started using
.scssfiles. And we've imported onlyswiper.scsswithout explicitly importing other styles from swiper.So to have effects-fade working we had to import that
.scssfiles:and then fade effect was working correctly :)