bestguy / sveltestrap

Bootstrap 4 & 5 components for Svelte
https://sveltestrap.js.org
MIT License
1.3k stars 183 forks source link

Howto : custom prev/next button for a carousel #441

Closed kbsali closed 2 years ago

kbsali commented 2 years ago

Hi,

I'm trying to implement a "welcome tour" carousel opened in a modal on your first connection. It works ok, But I would like to add a button on each slide to move to the next slide. I've tried different approach, but no luck so far, any hint on how to do this?

Thanks

bestguy commented 2 years ago

Hi @kbsali , this is pretty straightforward since you can control the activeIndex using whatever controls you need:

https://svelte.dev/repl/fd07af9c00454b9990d7ea42f5ef3020?version=3.46.4

LMK if this makes sense.

kbsali commented 2 years ago

awesome, that makes perfect sense and your repl makes it even easier to get! :) Thanks!