n How to use Slider/Carousel Component for Flickity.js in Vuejs | CodimTh

Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh

Installation and usage

See official documentation here.

$ npm install vue-flickity --save

Example how to use this library:

  <div class="slider">
     <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>

     <!-- 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>


import Flickity from 'vue-flickity';

new Vue({
  components: {

  data() {
    return {
      flickityOptions: {
        initialIndex: 3,
        prevNextButtons: false,
        pageDots: false,
        wrapAround: true

        // any options from Flickity can be used

  methods: {
    next() {

    previous() {


Riadh Rahmi

Senior Web Developer PHP/Drupal & Laravel

I am a senior web developer, I have experience in planning and developing large scale dynamic web solutions especially in Drupal & Laravel.

Web Posts


Page Facebook