leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.7k stars 657 forks source link

Slider not showing up #1204

Closed dmitrue closed 2 years ago

dmitrue commented 2 years ago

Hi there,

I'm trying to use noUiSlider in Rails app via Stimulus controller. I have the following import statements import noUiSlider from 'nouislider' and import wNumb from 'wnumb' and the initialization code: this.slider = noUiSlider.create(this.sliderTarget, { range: { min: 0, max: 10 }, start: [0, 8], step: 1 }) After initialization I have a div with generated classes 'noUi-target noUi-ltr noUi-horizontal noUi-txt-dir-ltr'. However the slider isn't showing up. There are no errors in the console as well.

leongersen commented 2 years ago

You'll need to include/import the css as well.

dmitrue commented 2 years ago

Got it, thanks 👍🏻

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.