2.1.0 • Published 3 years ago

vue-material-slider v2.1.0

Weekly downloads
109
License
-
Repository
-
Last release
3 years ago

Vue Material Slider

A material design slider build with vue. Live demo

Contents

Installation

npm install vue-material-slider --save

Import

Import and use in vue individually

import Vue from 'vue'
import "vue-material-slider/dist/vue-material-slider.css";
import { Slider, RangeSlider }  from "vue-material-slider";

Install all at once

import 'vue-material-slider/dist/vue-material-slider.css';
import VueMaterialSlider from 'vue-material-slider';
Vue.use(VueMaterialSlider);

Basic slider

Use in your components

<template>
  <vue-material-slider
    :min="10"
    :max="20"
    v-model="value"
  />
</template>

<script>
export default {
  data() {
    return {
      value: 0
    }
  }
}
</script>

Range Slider

<template>
  <vue-material-range-slider v-model="value" />
</template>

<script>
export default {
  data() {
    return {
      // Each array value corresponds to a new thumb
      value: [0, 25, 50]
    }
  }
}
</script>

Properties

PropTypedefaultDescription
minnumber0The minimum value of the slider
maxnumber100The maximum value of the slider
thumbLabelbooleanfalseWhether or not to show the label
invertbooleanfalseSet to true to reverse the slider
verticalbooleanfalseSet to true to make the slider vertical
displayWithfunctionnullFunction that will be used to format the value before it is displayed in the thumb label. Can be used to format very large number in order for them to fit into the slider thumb.
disabledbooleanfalseWhether the component is disabled.
stepSizenumber1The size of each step
2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.1

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

1.0.0

5 years ago