Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

yougotnet's avatar

Vue Slider Component

Has anyone successfully installed and used Vue Slider Component with Laravel? I can't seem to get it to work, any help or examples would be great.

https://github.com/NightCatSama/vue-slider-component

0 likes
3 replies
cmdobueno's avatar

Yes. All I do is run

npm install vue-slider-component --save

Then I include it as required in vue component.

Laravel does not care what you use when it comes to javascript.

Otherwise we need more details, what is the error? Are you getting an error install, or usage?

yougotnet's avatar

I guess my problem is not understanding how to include it as a required vue component.

cmdobueno's avatar

@yougotnet

Option 1: Import inside of a single VueComponent (this is GENERALLY what I use)

<template>
  <div>
    <vue-slider v-model="value"></vue-slider>
  </div>
</template>
<script>
import vueSlider from 'vue-slider-component';

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

Option 2: Globally import

import vueSlider from 'vue-slider-component';
Vue.component('vue-slider', vueSlider )

Further reading: https://vuejs.org/v2/guide/components-registration.html

https://nightcatsama.github.io/vue-slider-component/example/

https://jsfiddle.net/2xy72dod/1240/

1 like

Please or to participate in this conversation.