@mentorkadriu/vue-tiny-slider

Vue 3 component for tiny-slider
5,106 1
Install
npm install @mentorkadriu/vue-tiny-slider
Latest Version:0.1.8
Vue:3
Last Updated:Dec 14, 2021
Links: GitHub  ·  npm
Maintainer: mentorkadriu

vue-tiny-slider

Table of Contents

Installation

npm install @mentorkadriu/vue-tiny-slider

Usage

More usage options can be found in the:

<script>
  import { ref, onMounted } from "vue";
  import VueTinySlider from "@mentorkadriu/vue-tiny-slider";

  export default {
  name: "App",
  components: { VueTinySlider },
  setup() {
    // Optional: Create a ref to hold the slider value
    const slider = ref(null);
    
    // https://github.com/ganlanyuan/tiny-slider#options
    const options = {
      items: 3,
      speed: 400
    }
    onMounted(() => {
      // Get slider instance
      console.log(slider.value.getSlider());
    });


    function onIndexChange(info) {
      console.log(info);
    }
    
    return {
      onIndexChange,
      options,
      slider,
    };
  },
};
</script>

<template>
  <VueTinySlider :options="options" ref="slider" @indexChanged="onIndexChange">
    <div>Slide #1</div>
    <div>Slide #2</div>
    <div>Slide #3</div>
  </VueTinySlider>
</template>

Development

Setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build-lib

Related Packages

vue-tiny-slider

Vanilla javascript slider for all purposes created by ganlanyuan in Vue.

120,925 132
@jambonn/vue-carousel

A flexible, responsive, touch-friendly carousel for Vue.js

902
vue-carousel

A flexible, responsive, touch-friendly carousel for Vue.js

1,675,195 1,696
vue-carousel-3d

Beautiful, flexible and touch supported 3D Carousel for Vue.js

103,358 979
vue3-carousel-3d

Beautiful, flexible and touch supported 3D Carousel for Vue.js

26,162 19

Version History

Version Released Vue License
0.1.8 ^3.0.0
0.1.7 ^3.0.0
0.1.6 ^3.0.0
0.1.5 ^3.0.0
0.1.0 ^3.0.0