Vue carousel based on swiperjs
npm install vue-swiper-carousel##Demo
See vue-swiper
yarn install
`
OR
`
npm install
`$3
`
yarn serve
`$3
`
yarn build
`$3
`
yarn lint
`$3
See Configuration Reference.
$3
To begin using the plugin, you must first add it to vue instanceGlobally
`vuejs
import Vue from 'vue'
import Swiper from '@popsicle/vue-swiper'Vue.use(Swiper)
`On a component
`vuejs
`
Then you can include it in your vue template as follows:`vuejs
`
#### Output:
`html
...
`
#### Props:
|Props | Description| Type | Default | Required |
|---------------|----------- |:-------------:|-----------|-----------|
|loop |Set to true to enable continuous loop mode|Boolean | true | false |
|slidesPerView |Number of slides per view (slides visible at the same time on slider's container).| auto or Number | 1 | false |
|spaceBetween |Distance between slides in px. | Number | 0 | false |
|watchOverflow |When enabled Swiper will be disabled and hide navigation buttons on case there are not enough slides for sliding| Boolean | true | false |
|freeMode |slidesPerView: 'auto' is currently not compatible with multirow mode, when slidesPerColumn > 1 | Boolean | false | false |
|centeredSlides | If true, then active slide will be centered, not always on the left side. | Boolean | true | false |
|autoplay | Object with autoplay parameters or boolean true to enable with default settings. For example: {delay: 5000, ...}| Boolean or Object | true | false |
|autoHeight | Set to true and slider wrapper will adopt its height to the height of the currently active slide| Boolean | false | false |
|navigation | Show or hide navigation| Boolean | true | false |
|breakpoints | Allows to set different parameter for different responsive breakpoints (screen sizes). Not all parameters can be changed in breakpoints, only those which are not required different layout and logic, like slidesPerView, slidesPerGroup, spaceBetween, slidesPerColumn.| Object | {...} | false |
|speed | Duration of transition between slides (in ms)| Number | 300 | false |
|initialSlide | Index number of initial slide.| Number | 0 | false |
|direction | Could be 'horizontal' or 'vertical' (for vertical slider).| String | horizontal | false` |> If you use "margin" css property to the elements which go into Swiper in which you pass "spaceBetween" into, navigation might not work property.
> If you use it with "auto" value and along with loop: true then you need to specify loopedSlides parameter with amount of slides to loop (duplicate)
> slidesPerView: 'auto' is currently not compatible with multirow mode, when slidesPerColumn > 1