0.0.6 • Published 1 year ago

vue-abd-slider v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Vue Abd Slider

The vue-abd-slider is a responsive reusable slider made with VueJs, the slider use the power of transition and vuejs slots.

An example of using this slider is implemented in src/components/examples files, and hosted in jocular-lamington-350b7d.netlify.app

Usage

If you want to use this component in your project you can either copy the entire slider directory into your project.

Or Install it from npm using the following command:

npm install vue-abd-slider

The component have the following props:

Propsdescriptionrequiredtypedefault value
namecomponent name, also used as a keytruestring
dotssetting this prop to true will show the slider indicators, and hide them when assigned to falsefalsebooleanfalse
arrowssetting this prop to true will show the slider left and right controllers, and hide them when assigned to falsefalsebooleanfalse
intervalConfigurable Auto Play Option to switch between slides based on a given time durationfalsenumber3000ms

The two examples below shows how to use the slider component in both ways:

1- Local component

First you just need to import the slider component, and then define your steps inside of and it dont forget to give it a name, because name is a required prop.

<template>
 <slider-main :interval="2500" :name="'header-slider'" dots>
    <div>Slide 01</div>
    <div>Slide 02</div>
    <div>Slide 03</div>
    <div>Slide 04</div>
 </slider-main>
</template>
<script>
    import SliderMain from "../slider/SliderMain";

    export default {
        name: "ExampleComponent",
        components: { SliderMain },
    };
</script>

2- As a Package in npm

Install it from npm using the following command:

npm install vue-abd-slider

And then import the component from the packege and dont forget to import the css file too, because the css file is so importtant for the slider to run properly, and to be responsive.

<template>
 <slider-main :interval="2500" :name="'header-slider'" dots arrows>
    <div>Slide 01</div>
    <div>Slide 02</div>
    <div>Slide 03</div>
    <div>Slide 04</div>
 </slider-main>
</template>
<script>
    // the two lines below are so important  !!!!!!
    import SliderMain from "vue-abd-slider";
    import "vue-abd-slider/dist/vue-abd-slider.css"

    export default {
        name: "ExampleComponent",
        components: { SliderMain },
    };
</script>

screenshots

Some screenshots from an example of a simple home page that i have built using this component which is hosted in following url jocular-lamington-350b7d.netlify.app.

enter image description hereenter image description hereenter image description here
enter image description hereenter image description hereenter image description here

Developement Setup:

If you want to run this repository in your local machine and start contributing to this project the follwing settings are recommended. VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Lint with ESLint

npm run lint
0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago