Skip to content

Config

Available Props

PropTypeDefaultDescription
autoplaynumber0Time interval (in milliseconds) between auto-advancing slides. Set to 0 to disable autoplay.
breakpointMode'viewport', 'carousel''viewport'Defines whether breakpoints are calculated based on viewport width or carousel container width.
breakpointsobjectnullResponsive breakpoint configurations. Each breakpoint can override any carousel prop.
dir'ltr', 'rtl', 'ttb', 'btt''ltr'Carousel sliding direction. Supports horizontal (ltr/rtl) and vertical (ttb/btt) orientations.
enabledbooleantrueControls whether the carousel is interactive. When false, all interactions are disabled.
gapnumber0Space (in pixels) between carousel slides.
heightnumber | string'auto'Sets the carousel track height. Required for vertical orientation.
i18nobject{ ariaNextSlide: ...}Internationalization options for accessibility labels and text content.
ignoreAnimationsboolean | string | arrayfalseSpecifies which CSS animations should be excluded from slide size calculations. 0.10.0
itemsToScrollnumber1Number of slides to move when navigating. Useful for creating slide groups.
itemsToShownumber | 'auto'1Number of slides visible simultaneously. Use 'auto' for variable width slides.
modelValuenumber0Controls the active slide index. Can be used with v-model for two-way binding.
mouseDragbooleantrueEnables/disables mouse drag navigation.
pauseAutoplayOnHoverbooleanfalseWhen true, autoplay pauses while the mouse cursor is over the carousel.
preventExcessiveDraggingbooleanfalseLimits dragging behavior at carousel boundaries for better UX. 0.13.0
snapAlign'start', 'end', 'center-odd', 'center-even''center'Determines how slides are aligned within the viewport.
touchDragbooleantrueEnables/disables touch navigation on touch-enabled devices.
transitionnumber300Duration of the slide transition animation in milliseconds.
wrapAroundbooleanfalseWhen true, creates an infinite loop effect by connecting the last slide to the first.

itemsToShow: Controls the number of visible slides. Values between 1 and the total slide count are valid. Values outside this range are automatically clamped. Using 'auto' allows slides to determine their own width based on content.

Direction Settings: For vertical orientations ('ttb'/'top-to-bottom', 'btt'/'bottom-to-top'), the carousel requires a fixed height setting. Direction can be specified using either short ('ltr', 'rtl', 'ttb', 'btt') or verbose ('left-to-right', 'right-to-left', 'top-to-bottom', 'bottom-to-top') formats.

Drag Prevention: The preventExcessiveDragging option is automatically disabled when wrapAround is enabled, as boundary restrictions aren't needed in infinite loop mode.

Slots

Slides/Default

Used to render the carousel items. You can use either the default slot or wrap element in slides slot.

vue
<template>
  <Carousel>
    <template #slides>
      <Slide v-for="slide in 10" :key="slide">
        ...
      </Slide>
    </template>
  </Carousel>
</template>

Addons

Used to add display carousel addons components.

vue
<template>
  <Carousel>
    ...
    <template #addons>
      <Navigation />
      <Pagination />
    </template>
  </Carousel>
</template>

Slots Attributes

PropDescription
currentSlideindex number of the current slide.
slideSizethe width/height of a single slide element.
slidesCountthe count of all slides

Example

vue
<template>
  <Carousel>
    <Slide v-for="slide in slides" :key="slide">
      <div class="carousel__item">{{ slide }}</div>
    </Slide>
  
    <template #addons="{ slidesCount }">
      <Navigation v-if="slidesCount > 1" />
    </template>
  </Carousel>
</template>

I18n

Available keys:

KeyDefaultsDescription
ariaGallery"Gallery"Used as the aria-label for the main carousel element, indicating purpose.
ariaNavigateToSlide"Navigate to slide {slideNumber}"Sets title and aria-label for pagination buttons to select a slide.
ariaNextSlide"Navigate to next slide"Sets title and aria-label for the “Next” navigation button.
ariaPreviousSlide"Navigate to previous slide"Sets title and aria-label for the “Previous” navigation button.
iconArrowDown"Arrow pointing downwards"Sets title and aria-label for the downward-pointing arrow SVG icon.
iconArrowLeft"Arrow pointing to the left"Sets title and aria-label for the left-pointing arrow SVG icon.
iconArrowRight"Arrow pointing to the right"Sets title and aria-label for the right-pointing arrow SVG icon.
iconArrowUp"Arrow pointing upwards"Sets title and aria-label for the upward-pointing arrow SVG icon.
itemXofY"Item {currentSlide} of {slidesCount}"Provides screen readers with the current slide’s position in the sequence.

Released under the MIT License.