Slider Autoplay

The VSliderAutoplay component extends the VSlider functionality by automatically transitioning between slides with autoplay support and customizable pagination.

Props

PropTypeDefaultDescription
dataInterfaceObjectundefinedThe data structure interface for the slider.
dataArray[]Array of slide items to be displayed.
autoplayBooleantrueEnables autoplay functionality.
activecolorString#F1AF32Sets the active pagination item color.
showPaginationBooleantrueShows pagination dots for slide navigation.
autoplayChangeTimeNumber6000Duration (in ms) for autoplay slide transition.

Slots

Slot NameDescription
defaultSlot for content in the slider.

Usage

vue
<script setup lang="ts">
import VSliderAutoplay from 'UiKit/components/VSlider/VSliderAutoplay.vue';
const sliderItems = [
  { id: 1, testimonials: [{ text: "Great service!", author: "Alice" }] },
  { id: 2, testimonials: [{ text: "Loved it!", author: "Bob" }] },
  { id: 3, testimonials: [{ text: "Amazing experience.", author: "Charlie" }] },
];
</script>
<VSliderAutoplay 
    v-slot="active"
  :data="sliderItems" 
  autoplay
>
<div class="is--card">
      <div
        v-for="(item, itemIndex) in active.testimonials"
        :key="itemIndex"
      >
        <div
          :key="active.id"
        >
          <p
            :key="active.id"
          >
            {{ item.text }}
          </p>
          <div
            :key="active.id"
            class="is--h5__title"
          >
            {{ item.author }}
          </div>
        </div>
      </div>
    </div>
</VSliderAutoplay>
Help Ukraine to stop russian aggression