You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue-product-carousel

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-product-carousel

Simple slider on Vue.js with hot image replacement, Zoom and Swipe mode

0.1.3
Source
npmnpm
Version published
Weekly downloads
39
160%
Maintainers
1
Weekly downloads
 
Created
Source

Product carousel ported to Vue.js with hot image replacement, Zoom and Swipe mode

Usage

To be able to use this component you should install it first

npm i --save vue-product-carousel

Then import it:

import carousel from 'vue-product-carousel'

Use carousel component and pass your images as images prop:

<template>
  <carousel :images="images">
  </carousel>
</template>
<script>
...
data(){
  images:[
    'http://lorempixel.com/1000/1000/business/1/',
    'http://lorempixel.com/1000/1000/business/2/',
    'http://lorempixel.com/1000/1000/business/3/'
  ]
}
components:{
  carousel
}
...
</script>
...

Note: You will need Babel Loader in your Webpack config file in order to support ES6 syntax inside component.

Testing

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

Params

NameTypeDefaultRequiredDescription
imagesArray[]trueArray of image urls that will be used in slider
body-class-on-zoomStringzoomfalseClass that will be added to the body while Zoom mode is active. Very useful to hide header/footer in Zoom mode.

Credits

  • kalicki for idea.
  • thebird for Swipe lib

FAQs

Package last updated on 26 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts