Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto slide after certain interval #101

Closed
axelthat opened this issue Mar 17, 2019 · 2 comments
Closed

Auto slide after certain interval #101

axelthat opened this issue Mar 17, 2019 · 2 comments

Comments

@axelthat
Copy link

axelthat commented Mar 17, 2019

It would be great if there's something like auto slide which basically changes the slides after user-defined intervals. We could use the following props:

autoplay: Boolean
autoplayDelay: Number

Thanks!

@devinwreeks
Copy link

you can quite easily achieve this by binding the selectIndex property to a variable that is then manipulated using a setInterval method. The method can be triggered a variety of ways.

in methods:

  animateMetho(){
     setInterval(() => {
     if(this.animatepage == 3){ 
      this.animatepage = 0 .  // resets the slide to the beginning
    }
    else {
      this.animatepage++
    }
  }, 2000);
  },

@shiv19
Copy link
Contributor

shiv19 commented May 28, 2019

this.animatepage = (this.animatepage + 1) % this.slides.length;

@triniwiz triniwiz mentioned this issue Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants