Skip to content

Data

To use the data values, add a reference to the carousel element and then get the values from the data property.

Example:

html
<Carousel ref="myCarousel"> ... </Carousel>
js
import { ref } from 'vue';
const myCarousel = ref(null);

// Data can be accessed under data property
if (myCarousel.data.currentSlide === 10) {
  // Do your magic here
}
....

Available Data

DataDescription
configthe current carousel configuration
slidesCountslides total count
slideWidthsingle slide width
currentSlidecurrent slide index
maxSlidemaximum slide index
minSlideminimum slide index
middleSlidemiddle slide index