1.2.1 • Published 8 years ago

vigour-carousel v1.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

carousel

js-standard-style npm version Build Status

An infinite carousel for usage with vigour-element.

how to use

npm i --save vigour-carousel

Add the carousel to your app as a component, define the $collection for it's items and add the data.

The carousel exposes .next() and .previous() methods.

##setup

var e = require('vigour-element')
var carousel = require('vigour-carousel')

// define some data
var Observable = require('vigour-observable')
var Data = new Observable({
  inject: require('vigour-observable/lib/data'),
  Child: 'Constructor'
}).Constructor

// it expects a "focus" field (this will be used to store the current slide)
var carouselData = new Data({
  focus: 0,
  0:{},
  1:{},
  2:{},
  3:{}
})

// add carousel component to your app
var app = e({
  components: {
    carousel: carousel
  },
  DOM: document.body
})

// add your carousel
app.set({
  myCarousel: {
    type: 'carousel',
    items:{
      $collection: true
    }
  }
})

// add data to app
app.val = carouselData
1.2.1

8 years ago

1.2.0

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago