a carousel component for vue, display several carousel-item in carousel container
npm install vue-split-carousel!GitHub

A carousel component for vue, meanwhile display several carousel item.
Support Vue3, Vue2.7, Vue2, Nuxt2, Nuxt3 , Script tag import, support Typescript.
``bash`npm
npm i vue-split-carouselyarn
yarn add vue-split-carouselpnpm
pnpm add vue-split-carousel vue-split-carousel
Package path depends on the environment, the default is the Vue3 version, the package path for different environments:
Vue2 need install @vue/composition-api
- Vue3: vue-split-carousel/vue2.7
- Vue2.7: vue-split-carousel/vue2
- Vue2: vue-split-carousel/dist/vue2.7
- Nuxt2: vue-split-carousel
- Nuxt3: index.umd.js
- script import: script address is file under the corresponding Vue version directory under the dist directory
is used in , and custom content is placed inside split-carousel-item.
`html`
custom content
custom content2
`html
{{ item }}
`$3
`js
import Vue from 'vue'
import SplitCarousel from 'vue-split-carousel'
import App from './App.vue'
const app = createApp(App)
app.use(SplitCarousel) // Vue.use(SplitCarousel) in Vue2
app.mount('#app')
`
access through window.VueSplitCarousel variable, script address is index.umd.js file under the corresponding Vue version directory under the dist directory.
Or use public npm package cdn:
`html`
`html`
| Attribute | Description | Type | Accepted value | Default |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ---------------- | ------- |
| speed | transition duration of carousel item, in milliseconds | Number | - | 500 |
| autoplay | whether automatically switch carousel items | Boolean | - | true |
| interval | interval of switch carousel items, in milliseconds | Number | - | 3000 |
| loop | whether display carousel items in loop | Boolean | - | true |
| display-amount | the amount of carousel items display in carousel container | Number | - | 4 |
| item-width | the width of carousel items | Number | - | 120 |
| height | height of carousel, if the prop value type is number,the unit is px by default. you can pass string value to use other unit, eg: 40vh | Number/String | - | 80 |loop
| timing-function | the animation effect of carousel item,reference [transition-timing-function][1] | String | - | ease |
| pause-on-hover | whether pause autoplay while mouse hover | Boolean | - | true |
| arrow-visible | whether arrow visible, available when set to false` | String | default/always | default |
| Name | Description |
| ----- | --------------------- |
| left | customize left arrow |
| right | customize right arrow |
[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/transition-timing-function