1.0.1 • Published 2 years ago

vue-next-carousel v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Vue 3 Carousel Component

Demo

Installation

npm install vue-next-carousel or
yarn add vue-next-carousel

Usage

Global

import VCarousel from "vue-next-carousel";

const app = createApp(Dev);
app.use(VCarousel);

app.mount('#app');

Local

import { VCarousel } from "vue-next-carousel";
const app = createApp(Dev);
app.component("VCarousel", VCarousel);

app.mount('#app');

Style

import "vue-next-carousel/dist/style.css"

HTML

<v-carousel> <!-- Or you named -->
    <div></div>
    <img />
    <!-- <div></div> --> This will be omitted.
</v-carousel>

Configuration

PropertyTypeDefaultDescription
autoplayBooleantrueFlag to enable autoplay.
autoplayTimeoutNumber(in ms)3000Time elapsed before advancing slide in autoplay.
loopBooleantrueFlag to enable continuous loop mode.
minSwipeDistanceNubmer100(in px)Minimum distance for the swipe to trigger a slide advance.
slideRemainRatioNumber0.2(0 <= \$ < 1,for both sides)The space that remains for the next and prev slide.
transitionDurationNubmer(in ms)300Slide transition speed.
1.0.1

2 years ago

1.0.0

3 years ago