Code Monkey home page Code Monkey logo

vue-mint-slider's Introduction

vue-mint-slider

vue-mint-slider is a slider componen for Vue.js.

GitHub stars Build Status GitHub issues GitHub forks GitHub last commit license NPM NPM

Mobile demo

https://cherislive.github.io/projrct/vue-mint-slider/

Install

$ npm install vue-mint-slider

Import

Import using module

Import components to your project:

require('vue-mint-slider/dist/vue-mint-slider.css');

// in ES6 modules
import { Slider, SliderItem } from 'vue-mint-slider';

// in CommonJS
const { Slider, SliderItem } = require('vue-mint-slider');

// in Global variable
const { Slider, SliderItem } = VueMintSlider;

And register components:

Vue.component('slider', Slider);
Vue.component('slider-item', SliderItem);

Import using script tag

<link rel="stylesheet" href="../node-modules/vue-mint-slider/dist/vue-mint-slider.css" charset="utf-8">
<script src="../node-modules/vue-mint-slider/dist/vue-mint-slider.js"></script>
const vueSlider = VueMintSlider.Slider;
const vueSliderItem = VueMintSlider.SliderItem;

new Vue({
  el: 'body',
  components: {
    'slider': vueSlider,
    'slider-item': vueSliderItem
  }
});

Usage

Work on a Vue instance:

<slider>
  <slider-item>slider1</slider-item>
  <slider-item>slider2</slider-item>
  <slider-item>slider3</slider-item>
</slider>

Slider Options

Props

Option Type Description Default
perView Number Number of slides per view (min:1). 1
perGroup Number Set numbers of slides to define and enable group sliding. Useful to use with perView >= perGroup 1
groupFull Boolean --- false
showIndicators Boolean Show indicators on slider bottom true

Events

Event Name Description params
change triggers when current slider-item change new slider item Index

SliderItem Options

Props

Option Type Description Default
item Object -- --

Events

Event Name Description params
sliderItemOnClick triggers when click slider-item Props item: {}

Development

Watching with hot-reload:

$ npm run dev

Develop on real remote device:

$ npm run remote-dev {{ YOUR IP ADDRESS }}

License

MIT

vue-mint-slider's People

Contributors

cherislive avatar gebsl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.