
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
range-slider-element
Advanced tools
A cross browser customizable and accessible <range-slider> web component
A cross browser customizable and accessible <range-slider> web component.
Install via npm
npm install range-slider-element
Import as ES module
import 'range-slider-element';
Or via CDN
<script type="module" src="https://unpkg.com/range-slider-element@latest/dist/range-slider-element.js"></script>
<range-slider min="0" max="100" step="1" value="50"></range-slider>
Make sure to load the base styles exported via range-slider-element/style.css
.
Or via CDN
<link rel="stylesheet" href="https://unpkg.com/range-slider-element@latest/dist/range-slider-element.css">
min
The minimum permitted value. The default is 0
.max
The maximum permitted value. The default is 100
.step
The stepping interval. The default is 1
.value
The value. The default is min + (max - min) / 2
.dir
Directionality. The default is ltr. Allowed options rtl
.orientation
The default is horizontal. Allowed options vertical
.CSS custom properties
Exposed CSS custom properties scoped within the range-slider
element.
--track-size
- The track size. The default is 0.2rem
. Can be overwritten for customization.--thumb-size
- The thumb size. The default is 1.2rem
. Can be overwritten for customization.DOM selectors
range-slider {}
range-slider [data-track] {}
range-slider [data-track-fill] {}
range-slider [data-thumb] {}
/* Advanced customization */
range-slider [data-runnable-track] {}
For examples of how to customize the default styling, check out the docs.
input
- Pointer move, value changed. Bubbles.change
- Pointer up, key up, value changed. Bubbles.Browsers without native custom element support require a polyfill.
Distributed under the MIT license. See LICENSE for details.
2.0.0 (2025-03-02)
CSS custom properties scoped under the range-slider element
- --value-percent
- --element-height
- --track-height
/* The track size based on the orientation */
+ --track-size
With v2 the value percent is automatically applied to the track fill and thumbs.
DOM selectors
Track/-fill
- range-slider::before {}
+ range-slider [data-track] {}
+ range-slider [data-track-fill] {}
- range-slider .thumb-wrapper {}
/* Advanced customization */
+ range-slider [data-runnable-track]
Thumb
- range-slider .thumb {}
+ range-slider [data-thumb] {}
Focus state
- range-slider:focus .thumb {}
+ range-slider [data-thumb]:focus {}
Instead of the element itself, the thumb is focusable.
Active state
- range-slider.touch-active .thumb-wrapper .thumb {}
+ range-slider thumb:active {}
FAQs
A cross browser customizable and accessible <range-slider> web component
The npm package range-slider-element receives a total of 107 weekly downloads. As such, range-slider-element popularity was classified as not popular.
We found that range-slider-element demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.