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.currentSlide === 10) {
  // Do your magic here
}
....

Available Exposed data

DataDescription
currentSlidecurrent slide index
activeSlidecurrent slide index even while dragging
isSlidingif the slider is dragging
isVerticalif the slider is vertical
navAn object of navigation methods
configthe current carousel configuration
maxSlidemaximum slide index
minSlideminimum slide index
slideSizesingle slide width or height
slidesCountslides total count
slidesan array of Slides component
viewportthe viewport element
visibleRangean object with {min, max} properties min being the lowest visible slide index and max the highest

Released under the MIT License.