vue-curseur v0.1.0-alpha.1.2
Light, extendable and reactive Slider for Vue 3
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
About The Project
Getting Started
About The Project
TBA
Built With
Getting Started
Prerequisites
- Vue 3
# for npm:
npm install vue@latest
# for yarn:
yarn add vue@latest
Installation
# for npm:
npm install vue-curseur
# for yarn:
yarn add vue-curseur
Usage
Standalone Component Example
//main.js or MyComponent.vue
import "vue-curseur/dist/style.css";
//MyComponent.vue
<script setup>
import { VueCurseur, CurseurSlide } from "vue-curseur";
const slides = [
{ img: "https://picsum.photos/id/237/1800/500", alt: "Dog Image" },
{ img: "https://picsum.photos/id/811/1800/500", alt: "Forest Image" },
{ img: "https://picsum.photos/id/892/1800/500", alt: "Plymouth Image" },
{ img: "https://picsum.photos/id/1002/1800/500", alt: "Random Image" },
{ img: "https://picsum.photos/id/316/1800/500", alt: "Bridge Image" },
{ img: "https://picsum.photos/id/757/1800/500", alt: "Car Image" },
];
</script>
<template>
<VueCurseur
:autoPlay="true"
:transitionSpeed="300"
:autoPlaySpeed="5000"
effect="grow"
>
<CurseurSlide v-for="(s, i) in slides" :key="i">
<div>
<img class="image" :src="s.img" :alt="s.alt" />
</div>
</CurseurSlide>
</VueCurseur>
</template>
Plugin Example
//main js
import App from "./App.vue";
import "vue-curseur/dist/style.css";
import VueCurseurPlugin from "vue-curseur";
createApp(App).use(VueCurseurPlugin).mount("#app");
//SliderComponent.vue
<script setup>
const slides = [
{ img: "https://picsum.photos/id/237/1800/500", alt: "Dog Image" },
{ img: "https://picsum.photos/id/811/1800/500", alt: "Forest Image" },
{ img: "https://picsum.photos/id/892/1800/500", alt: "Plymouth Image" },
{ img: "https://picsum.photos/id/1002/1800/500", alt: "Random Image" },
{ img: "https://picsum.photos/id/316/1800/500", alt: "Bridge Image" },
{ img: "https://picsum.photos/id/757/1800/500", alt: "Car Image" },
];
</script>
<template>
<vue-curseur
:autoPlay="true"
:transitionSpeed="300"
:autoPlaySpeed="5000"
effect="grow"
>
<curseur-slide v-for="(s, i) in slides" :key="i">
<div>
<img class="image" :src="s.img" :alt="s.alt" />
</div>
</curseur-slide>
</vue-curseur>
</template>
Roadmap
Add Reactive slides
Add Navigation
Add Pagination
Add Changelog
Add Templating
Add Additional Templates w/ Examples
Add code examples to readme
Multi-language Support
Dhivehi
TBA
TBA
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
Fork the Project
Create your Feature Branch (
git checkout -b feature/AmazingFeature
)Commit your Changes (
git commit -m 'Add some AmazingFeature'
)Push to the Branch (
git push origin feature/AmazingFeature
)Open a Pull Request
License
Distributed under the MIT License. See LICENSE
file for more information.
Contact
Your Name - @Ahmed__Imraan - ahmed.imraan.ai@live.com
Project Link: https://github.com/ahmed-imraan-ai/Vue-Curseur
Acknowledgments
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!