Guide

Installation

1
npm install -S vue-carousel

Usage (Global)

You may install Vue Carousel globally:

1
2
3
4
import Vue from 'vue';
import VueCarousel from 'vue-carousel';
Vue.use(VueCarousel);

This will make <carousel> and <slide> available to all components within your Vue app.

Usage (Local)

Include the carousel directly into your component using import:

1
2
3
4
5
6
7
8
9
10
import { Carousel, Slide } from 'vue-carousel';
export default {
...
components: {
Carousel,
Slide
}
...
};

HTML Structure

Once the Carousel and Slide components are installed globally or imported, they can be used in templates in the following manner:

1
2
3
4
5
6
7
8
<carousel>
<slide>
Slide 1 Content
</slide>
<slide>
Slide 2 Content
</slide>
</carousel>