Skip to content

MediaCarousel ​

Slides with scroll snap, indicators and the keyboard. Autoplay pauses on hover and focus and is off when the visitor asked for less motion.

ts
import { MediaCarousel } from '@zairakai/vue-components/Medias'

Usage ​

vue
<MediaCarousel />

Example ​

vue
<script setup>
  const slides = ['First slide', 'Second slide', 'Third slide']
</script>

<template>
  <MediaCarousel
    :items="slides"
    label="Slides"
  />
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
itemsarray[]The slides: any items, shown with the item slot.
modelValuenumberundefinedThe index of the current slide.
autoplaynumber0Move on by itself, every this many milliseconds. Not when the visitor prefers less motion.
loopbooleantrueGo back to the first slide after the last.
labelstring'Carousel'
previousLabelstring'Previous slide'
nextLabelstring'Next slide'
slideLabelstring'{n} of {total}'
indicatorsbooleantrue

Events ​

NameDescription
update:modelValue

Slots ​

NameDescription
item

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.