range-slider.mdx 790 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. title: Range slider
  3. ---
  4. To be able to use the range slider in your application you will need to install the nouislider dependency with `npm install nouislider`.
  5. All options and features can be found [**here**](https://refreshless.com/nouislider/).
  6. ## Basic range slider
  7. ```html code example centered libs="nouislider" vendors
  8. <div class="form-range" id="range-color"></div>
  9. <script>
  10. document.addEventListener("DOMContentLoaded", function () {
  11. window.noUiSlider && (noUiSlider.create(document.getElementById('range-color'), {
  12. start: 40,
  13. connect: [true, false],
  14. step: 10,
  15. range: {
  16. min: 0,
  17. max: 100
  18. }
  19. }));
  20. });
  21. </script>
  22. ```
  23. That's only the basic features and options of range slider. More possibilities can be found [**here**](https://refreshless.com/nouislider/).