Search code examples
carouseltailwind-css

Turn off auto-slide in tailwind carousel


How do I turn off a carousel in tailwind elements from auto-sliding? It seems to be the default setting, but I can't find any documentation on how to turn it off. I've used this example on the tailwind elements page: https://tailwind-elements.com/docs/standard/components/carousel/

I've used the data-interval="false" attribute, but it appears to stop autosliding the first time, but after manually sliding by interacting with the slider buttons, it starts autosliding again.


Solution

  • I was having the same issue with the carousel, and I noticed that based on this question, you need to use data-bs-interval="false" instead for Bootstrap 5.x which Tailwind Elements uses. I've tried this out and it seems to stop the carousel from sliding automatically.