Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.83k stars 418 forks source link

I need to delay more the fade or the animation from one slide to another #1302

Open DianyelaMaldonado opened 5 months ago

DianyelaMaldonado commented 5 months ago

Checks

Version

4.1.4

Description

I need the fade to be less fast, I need the time to change from one slide to another to be slower, so that the animation feels smooth

This is my code: ("speed" property does not work)


export default () => ({
  Slider: null,
  init() {
    this.Slider = new Splide(this.$refs.carousel, {
      type: "fade",
      perPage: 1,
      pagination: true,
      arrows: true,
      transition : 'ease-in-out',
    });

    this.Slider.mount();

    const fadeElements = document.querySelectorAll('.splide__slide');
    fadeElements.forEach(element => {
      element.style.transitionDuration = '4s';
    });
  },
});

Reproduction Link

No response

Steps to Reproduce

"speed" property does not work

Expected Behaviour

I need the fade to be less fast, I need the time to change from one slide to another to be slower, so that the animation feels smooth