Vue Awesome Swiper (Deprecated)

5.0.1 · deprecated · verified Sun Apr 19

Vue Awesome Swiper is a Vue.js component wrapper for the Swiper carousel library. As of its latest stable version, 5.0.1, the project is officially deprecated. Version 5.x acts exclusively as a re-export of the official `swiper/vue` package, making its APIs entirely incompatible with previous `vue-awesome-swiper` versions (v4.x and below). All functionality and component structures now directly mirror the official Swiper Vue component. Developers are strongly advised to migrate to the official `swiper/vue` package for continued stability, features, and future updates. Prior versions (e.g., v4.1.1 for Swiper 5-6/Vue 2, v3.1.3 for Swiper 4.x/Vue 2) offered direct integration but are no longer maintained. The project effectively has no independent release cadence since its deprecation, simply following `swiper/vue`'s exports.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates the basic setup of `vue-awesome-swiper` v5.x within a Vue 3 SFC, including module imports, event handling, and basic styling for a functional carousel.

<template>
  <swiper
    :modules="modules"
    :pagination="{ clickable: true }"
    :slides-per-view="1"
    :space-between="30"
    navigation
    @swiper="onSwiper"
    @slideChange="onSlideChange"
  >
    <swiper-slide>Slide 1: Welcome to Swiper!</swiper-slide>
    <swiper-slide>Slide 2: A powerful touch slider.</swiper-slide>
    <swiper-slide>Slide 3: Build amazing carousels.</swiper-slide>
    <swiper-slide>Slide 4: Fully customizable.</swiper-slide>
  </swiper>
</template>

<script setup>
  import { ref } from 'vue';
  import SwiperClass, { Pagination, Navigation } from 'swiper';
  import { Swiper, SwiperSlide } from 'vue-awesome-swiper';

  // Import Swiper styles
  import 'swiper/css';
  import 'swiper/css/pagination';
  import 'swiper/css/navigation';

  const modules = [Pagination, Navigation];
  const swiperInstance = ref(null);

  const onSwiper = (swiper) => {
    swiperInstance.value = swiper;
    console.log('Swiper initialized:', swiper);
  };

  const onSlideChange = () => {
    console.log('Slide changed!');
  };
</script>

<style scoped>
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  height: 200px;
  background-color: #f0f0f0;
  border-radius: 8px;
}
</style>

view raw JSON →