Gathering detailed insights and metrics for @yaireo/ui-range
Gathering detailed insights and metrics for @yaireo/ui-range
Gathering detailed insights and metrics for @yaireo/ui-range
Gathering detailed insights and metrics for @yaireo/ui-range
Beautiful UI-Range input component, highly customisable, based on CSS variables. including a floating output value, min & max values on the sides & ticks according to the steps
npm install @yaireo/ui-range
Typescript
Module System
Node Version
NPM Version
66.7
Supply Chain
98.1
Quality
76.1
Maintenance
100
Vulnerability
100
License
SCSS (100%)
Total Downloads
116,366
Last Day
30
Last Week
348
Last Month
1,413
Last Year
23,914
MIT License
111 Stars
69 Commits
11 Forks
5 Watchers
1 Branches
2 Contributors
Updated on Apr 10, 2025
Minified
Minified + Gzipped
Latest Version
2.1.15
Package Id
@yaireo/ui-range@2.1.15
Unpacked Size
23.58 kB
Size
7.04 kB
File Count
5
NPM Version
7.0.15
Node Version
15.4.0
Cumulative downloads
Total Downloads
Last Day
-57.7%
30
Compared to previous day
Last Week
-7.4%
348
Compared to previous week
Last Month
14%
1,413
Compared to previous month
Last Year
-57.3%
23,914
Compared to previous year
<input type='range'>
A CSS-only component which is designed to work along-side the corresponding markup (examples below).
This code here is designed to bring customizabiilty to the maximum for the range
input element,
extending the very basic <input type='range'>
native browser component, infusing it with extra features.
dir=rtl
attributeIn addition to all the root variables, a helper variable --is-left-most
exists on the <input>
element itself,
which can be helpful if it is desirable to visually distingush between left/right thumbs of a multi-range slider.
⚠️--min
& --max
variables' values should be kept as integers (not floating-point) because a CSS trick
using counters is used to print the values in a pseudo-element, and it only works for integers.
I must say that CSS is not yet good enough to make this code much cleaner. I had to rely on repeating the input's attributes in its parent node, as CSS style variables, because CSS is currently unable to extrapolate attibutes as variables.
Even if the above was possible, still, it would require passing varables from one sibling to another, or to a parent.
The <input>
element has all the information needed, but the oninput
event is needed to keep things in-sync for the CSS to be "aware".
--text-value
is needed along-side --value
due to CSS inability to cast variables types. Technically
it is possible with new Houdini, but it's not yet a norm in modern-browsers.
I intentionallyl did not use the native <progress>
element, since it wasn't flexible enough (especially not cross-browser). Using <div class='range-slider__progress'></div>
instead.
npm i @yaireo/ui-range
Import CSS file via JS
1import '@yaireo/ui-range'
Or via CSS @import
1@import '@yaireo/ui-range'
For the SCSS version, use this path:
@yaireo/ui-range/ui-range.scss
1<div class="range-slider" style='--min:0; --max:100; --value:75; --text-value:"75"; --suffix:"%"'> 2 <input type="range" min="0" max="100" value="75" oninput="this.parentNode.style.setProperty('--value',this.value); this.parentNode.style.setProperty('--text-value', JSON.stringify(this.value))"> 3 <output></output> 4 <div class='range-slider__progress'></div> 5</div>
1<div class="range-slider flat" data-ticks-position='top' style='--min:-500; --max:500; --prefix:"$" --value-a:-220; --value-b:400; --text-value-a:"-220"; --text-value-b:"400";'> 2 <input type="range" min="-500" max="500" value="-220" oninput="this.parentNode.style.setProperty('--value-a',this.value); this.parentNode.style.setProperty('--text-value-a', JSON.stringify(this.value))"> 3 <output></output> 4 <input type="range" min="-500" max="500" value="400" oninput="this.parentNode.style.setProperty('--value-b',this.value); this.parentNode.style.setProperty('--text-value-b', JSON.stringify(this.value))"> 5 <output></output> 6 <div class='range-slider__progress'></div> 7</div>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More