Skip to content

Tofandel/vue3-carousel

 
 

Repository files navigation

Vue 3 Carousel

Modern lightweight Vue 3 carousel component

npm npm Package Quality

Documentation

https://ismail9k.github.io/vue3-carousel/

Features

  • Responsive breakpoints
  • Mouse/touch dragging
  • Infinity scroll (wrapping around)
  • Auto play
  • Add classes for active and for visible slides
  • RTL
  • Enrich a11y

Getting started

Installation

First step is to install it using yarn or npm:

npm install vue3-carousel

# or use yarn
yarn add vue3-carousel

Basic Using

<template>
  <Carousel :items-to-show="1.5">
    <Slide v-for="slide in 10" :key="slide">
      {{ slide }}
    </Slide>

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

<script>
// If you are using PurgeCSS, make sure to whitelist the carousel CSS classes
import 'vue3-carousel/dist/carousel.css'
import { Carousel, Slide, Pagination, Navigation } from 'vue3-carousel'

export default {
  name: 'App',
  components: {
    Carousel,
    Slide,
    Pagination,
    Navigation,
  },
}
</script>

Packages

No packages published

Languages

  • TypeScript 88.9%
  • CSS 7.1%
  • JavaScript 3.8%
  • Shell 0.2%