Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/jiangfengming/vue-carousel

A Vue carousel component
https://github.com/jiangfengming/vue-carousel

Last synced: about 2 months ago
JSON representation

A Vue carousel component

Lists

README

        

# @jfm/vue-carousel
A Vue carousel component.

## Demo
[https://jiangfengming.github.io/vue-carousel/demo/](https://jiangfengming.github.io/vue-carousel/demo/)

[Source code](https://github.com/jiangfengming/vue-carousel/blob/master/demo-src/App.vue)

## Install
```
npm i @jfm/vue-carousel
```

## Usage
```vue



slide 1
slide 2
slide 3

backward
forward

import { Carousel, Slide } from '@jfm/vue-carousel'

export default {
components: { Carousel, Slide },

data: () => ({
currentPage: 1,
totalPages: 1
})
}

.carousel {
width: 400px;
height: 300px;
}

.slide {
width: 100%;
height: 100%;
}

```

## \ options
* `current-page.sync`: `Number`. Current page number.
* `total-page.sync`: `Number`. Total page count.
* `autoplay`: `Boolean` or `Number` (milliseconds). If `true`, it defaults to 3000.
* `direction`: `String`. `horizontal`, or `vertical`.

## License
[MIT](LICENSE)