Git Product home page Git Product logo

Comments (6)

pwnz22 avatar pwnz22 commented on August 16, 2024 1

You need to npm install flickity-as-nav-for and import it

npm install flickity-as-nav-for
import 'flickity-as-nav-for'

from vue-flickity.

josefarrugia avatar josefarrugia commented on August 16, 2024

I too am stuck on this. Any updates?

from vue-flickity.

mortensassi avatar mortensassi commented on August 16, 2024

How did you get it to work? Imported the plugin and set the option but it doesn't do anything

from vue-flickity.

mrKorg avatar mrKorg commented on August 16, 2024

Hi, I have the same problem

from vue-flickity.

danimalweb avatar danimalweb commented on August 16, 2024

I'd love to see an example of this too.

from vue-flickity.

diegood avatar diegood commented on August 16, 2024

Example html:

<template>
  <div>
      <Flickity  ref="main" :options="mainImgOtions" class="carousel-main" style="height:20em">
            <b-card  v-for="(image, index) in product.images" :key="index" class="carousel-cel h-100 w-100">
              <b-img  :src="image" alt="Left image"></b-img>
            </b-card>
      </Flickity>
      <Flickity  ref="nav" :options="navImgOtions" class="carousel-nav" style="height:5em">
            <b-card  v-for="(image, index) in product.images" :key="index" class="carousel-cel h-100 w-25">
              <b-img  :src="image" alt="Left image"></b-img>
            </b-card>
      </Flickity>
  </div>
</template>

Example Script:

import Flickity from 'vue-flickity';
import 'flickity-as-nav-for'
export default {
  name: "DetailProductImgComponent",
  components: { Flickity },
  data() {
    return {
      imgVisible: 0,
      mainImgOtions: {
        initialIndex: 0,
        prevNextButtons: false,
        pageDots: false,
        wrapAround: false
      },
      navImgOtions: {
        asNavFor: '.carousel-main',
        freeScroll: false,
        contain: true,
        prevNextButtons: false,
        pageDots: false,
        wrapAround: true
      }
    }
  },
};

from vue-flickity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.