0.0.2 • Published 3 years ago

carousel-view v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

CarouselView

Installation

npm i carousel-view

Usage

  1. Global registration

You may install Vue Carousel globally:

// in main.js
import CarouselView from 'carousel-view'
import 'carousel-view/dist/style/carousel-view.css'

Vue.use(CarouselView)
  1. Local component

Include the carousel directly into your component using import:

// in your vue file
import { CarouselView } from 'carousel-view'
import 'carousel-view/dist/style/carousel-view.css'

export default {
  components: {
    CarouselView
  }
  ...
}

HTML Structure

<carousel-view>
    ...your dom
</carousel-view>

Configuration

PropertyTypeDefaultDescription
directionenum(horizontal/vertical)'horizontal'direction for carousel
loopBooleantrueFlag to make the carousel loop around when it reaches the end
autoHeightBooleantrueAdjust the height of the carousel for the current slide.
autoWidthBooleanfalseAdjust the width of the carousel for the current slide.
mousewheelControlBooleantrueenable mousewheel control
paginationVisibleBooleantruevisibility of pagination
paginationClickableBooleantruecarousel control via pagination click
speedNumber300animation speed
indicatorColorStringrgba(153, 153, 153, 0.5)color of indicator
indicatorTintColorString#007afftint color of indicator

...