vue3-carousel
vue3-carousel copied to clipboard
Items to Scroll not working right
<carousel ref="offersCarousel" :items-to-show="2" :items-to-scroll="2" :mouse-drag="false">
<slide v-for="offer in offers" :key="offer.id" class="flex w-full flex-col justify-start">
<div
class="h-[15rem] w-full rounded-sm bg-[url(https://picsum.photos/400/240)] bg-cover bg-no-repeat"
></div>
<div class="my-4 flex w-full flex-col justify-start">
<h3 class="text-left text-xl font-bold uppercase text-fleetlink-gray" v-text="offer.title" />
<h4 class="text-left text-gray-500" v-text="offer.description" />
</div>
</slide>
</carousel>
For the Buttons below I use the normal next()
and prev()
method.
https://github.com/ismail9k/vue3-carousel/assets/30083590/4c23f4ac-e2ae-4f18-9d6d-56ac5bb7f708
hi, you can solve this problem by snapAlign = 'start'