vue-product-spinner

**npm**
1,928 104
Install
npm install vue-product-spinner
Latest Version:0.2.0
Vue:2
License:MIT
Last Updated:Jan 3, 2023
Links: GitHub  ·  npm
Maintainer: micheleriva

The product spinner that Vue.js was missing.

Build Status VueProductSpinner weekly downloads MIT License

Live Demo




Try it on CodeSandbox!

Edit Vue Product Spinner Demo

Installation

npm

npm i vue-product-spinner

yarn

yarn add vue-product-spinner

UMD build

<script src="https://cdn.jsdelivr.net/npm/vue-product-spinner@latest/dist/VueProductSpinner.umd.min.js" type="text/javascript"></script>

Usage

VueProductSpinner will allow you to add any component in order to handle the image prefetch time.
You can use it as follows:

<template>
  <VueProductSpinner 
    :imgs="imgs" 
    :slider="true"
  >
    <PreloadSpinnerComponent />
  </VueProductSpinner>
</template>

<script>
  import VueProductSpinner from 'vue-product-spinner'
  import PreloadSpinnerComponent from 'some-library'

  export default {
    components: {
      VueProductSpinner
    },
    data() {
      return {
        images: [
          'img1.jpg',
          'img2.jpg',
          'img3.jpg'
        ]
      }
    }
  }
</script>

props

Prop Name Type Is Required Default Value Description
images string[] required [] An array of images to be displayed
infinite Boolean optional true Infinite loop
speed Number optional 3 Rotation speed
touchDrag Boolean optional true Handle touch events
mouseWheel Boolean optional true Handle mouse wheel events
mouseDrag Boolean optional true Handle mouse drag events
slider Boolean optional false Show slider input
sliderClass String optional Custom slider CSS class

Roadmap

  • Add image preloader
  • Add auto spin
  • Add hooks
  • Solve basic bugs
  • Add "mouse move" support
  • Add "mouse scroll" support
  • Add slider support
  • Add touchscreen support

Buy Me a Beer!

Beerpay

Please help me maintain my projects with a little and simple donation! I need beer to work! 😃

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Related Packages

@fxshelf/card-orbit

Path-constrained 3D card orbit carousel for React and Vue — rise, arc, exit. No...

610 0
vue-slick

Vue component for Slick-carousel (http://kenwheeler.github.io/slick)

411,658 612
vue3-spinner

Spinners for Vue 3

43,594 11
vue2-swiper

一个简单的vue2.x swiper插件

7,655 12
@jfm/vue-carousel

A Vue carousel component

3,293 1

Version History

Version Released Vue License
0.2.0 2.6.3 MIT
0.1.9 2.6.3
0.1.8 2.6.3
0.1.7 2.6.3 MIT
0.1.6 ^2.5.22
Pre-releases (10)
Version Released Vue License
0.0.10-dev ^2.5.17 MIT
0.0.9-dev ^2.5.17 MIT
0.0.8-dev ^2.5.17 MIT
0.0.7-dev ^2.5.17 MIT
0.0.6-dev ^2.5.17 MIT