Home

Awesome

<range-slider> element

A customizable range slider element.

CI status npm version npm downloads

Accessible range slider custom element with keyboard support.
Follows the ARIA best practices guide on sliders.

<div align="center"> <br> <br> <img src="https://user-images.githubusercontent.com/464300/66577218-443e1400-eb79-11e9-9e66-a8b62bbc97ba.png" alt="range slider element preview example" width="300"> <br> <br> </div>

Install

$ npm install range-slider-element

Usage

import 'range-slider-element';
<range-slider min="0" max="100" step="1"></range-slider>

Attributes

Styling

Exposed CSS custom properties scoped within the range-slider element.

range-slider {}
range-slider .thumb-wrapper {}
range-slider .thumb {}

Events

Browser support

Browsers without native custom element support require a polyfill.

License

MIT © André Ruffert