Skip to content

ahmed-imraan-ai/Vue-Curseur

Repository files navigation

Contributors MIT License Issues Current Version


Vue-Curseur

Vue-Curseur

Light, extendable and reactive Slider for Vue 3


Explore the docs »
View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project

  2. Getting Started

  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Vue-Curseur Example

TBA

(back to top)

Built With

(back to top)

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

(back to top)

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>

(back to top)

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).

(back to top)

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!

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  3. Commit your Changes (git commit -m 'Add some AmazingFeature')

  4. Push to the Branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE file for more information.

(back to top)

Contact

Your Name - @Ahmed__Imraan - ahmed.imraan.ai@live.com

Project Link: https://github.com/ahmed-imraan-ai/Vue-Curseur

(back to top)

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!

(back to top)