0.1.2 • Published 6 years ago

carousel-vue v0.1.2

Weekly downloads
12
License
-
Repository
github
Last release
6 years ago

Table of Contents

Installation

npm install carousel-vue

or if you prefer yarn

yarn add carousel-vue

Usage

Include the carousel directly into your component using import:

import { Carousel, CarouselItem } from 'carousel-vue';

export default {
  ...
  components: {
    Carousel,
    CarouselItem
  }
  ...
};

Example

image(http://github.com/LiHongyan11/carousel-vue/raw/master/example@2x.png

Configuration

PropertyTypeDefaultDescription
visibleItemNumber7visible item number
reduceNumber10adjoin item reduce px

HTML Structure

Once the Carousel and Slide components are installed globally or imported, they can be used in templates in the following manner:

  <carousel>
    <carousel-item :index="0">
      item 1 Content
    </carousel-item>
    <carousel-item :index="1">
      item 2 Content
    </carousel-item>
  </carousel>

Development

A sandboxed dev environment is provided by vue-play. Changes made to the component files will appear in real time in the sandbox.

To begin development, run:

npm install 
npm run serve

or, if you prefer yarn

yarn install 
yarn serve

then navigate to http://localhost:8080

License

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