[Vuejs]-Range slider how to make step size change in vue.js

0👍

You can use a simple input range with your desired values. Only the v-model is important to create the two-way-data-binding.

new Vue({
  el: '#app',
  data: {
    selectedValue: 0
  }
})
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>

<div id='app'>
  <input type="range" min="0" max="2500" step="50" v-model="selectedValue">
  <p>selected value: {{ selectedValue }}</p>
</div>

Leave a comment