vue-flickity
A Vue Component for Flickity.js (http://flickity.metafizzy.co/).
137,231
| Install | |
|---|---|
npm install vue-flickity |
|
| Latest Version: | 1.2.1 |
| Vue: | 2 |
| License: | ISC |
| Last Updated: | Jul 30, 2019 |
| Links: | npm |
Maintainer: drewjbartlett
Flickity for Vue.js
A Vue Component for Flickity.js - See a live demo here.
Vue support
Supports only Vue >= 2
Installation and usage
See official documentation here.
$ npm install vue-flickity --save
import Flickity from 'vue-flickity';
new Vue({
components: {
Flickity
},
data() {
return {
flickityOptions: {
initialIndex: 3,
prevNextButtons: false,
pageDots: false,
wrapAround: true
// any options from Flickity can be used
}
}
},
methods: {
next() {
this.$refs.flickity.next();
},
previous() {
this.$refs.flickity.previous();
}
}
});
<flickity ref="flickity" :options="flickityOptions">
<div class="carousel-cell">1</div>
<div class="carousel-cell">2</div>
<div class="carousel-cell">3</div>
<div class="carousel-cell">4</div>
<div class="carousel-cell">5</div>
</flickity>
<!-- if you don't want to use the buttons Flickity provides -->
<button @click="previous()">Custom Previous Button</button>
<button @click="next()">Custom Next Button</button>
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 1.2.1 | ISC | |
| 1.1.2 | ISC | |
| 1.1.1 | ISC | |
| 1.1.0 | ISC | |
| 1.0.11 | ISC | |
| 1.0.10 | ISC | |
| 1.0.9 | ISC | |
| 1.0.8 | ISC | |
| 1.0.7 | ISC | |
| 1.0.5 | ISC | |
| 1.0.4 | ISC | |
| 1.0.3 | ISC | |
| 1.0.2 | ISC | |
| 1.0.0 | ISC |