Add autoplay to tabs
Tutorial » Add autoplay to tabs
This tutorial will show you how to create an autoplay tabs. The tabs component displays first tab panel, and then display the second, the third… We will write some code to automatically switch tab panels and get it to loop.
Step 1: Create tabs
Step 2: Write autoplay code
As you can see, we call the 'tabs' method to get all tab panels and switch them by using 'setInterval' function.