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
currentSlidecurrent slide index
maxSlidemaximum slide index
middleSlidemiddle slide index
minSlideminimum slide index
slideSizesingle slide width or height
slidesCountslides total count

Released under the MIT License.