ismail9k / vue3-carousel

Vue 3 carousel component
https://ismail9k.github.io/vue3-carousel/
MIT License
653 stars 162 forks source link

Items to Scroll not working right #331

Open NIFO43 opened 8 months ago

NIFO43 commented 8 months ago
<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

iTemes commented 1 month ago

hi, you can solve this problem by snapAlign = 'start'