Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@pearson-ux/range-slider
Advanced tools
A shareable, accessible input range slider
https://pearson-ux.github.io/web-components/range-slider/
Run the following in your terminal:
# my-app is the directory containing your app
cd my-app
npm install --save @pearson-ux/range-slider
Import the web component onto the page, inbetween the <head>
tags, like so:
<head>
<!-- Polyfills -->
<script type="text/javascript">
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-loader.js"><\/script>');
document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/custom-elements-es5-adapter.js"><\/script>');
} else {
document.write('<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2/webcomponents-loader.js"><\/script>');
document.write('<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2/custom-elements-es5-adapter.js"><\/script>');
}
</script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<!-- Web component script -->
<script src="path/to/pearson-range-slider.js"></script>
</head>
Important Notes:
Add the pearson-range-slider
open and closing tags to the page.
All attributes in this API are optional.
Attribute | Type | Default | Description |
---|---|---|---|
min | Bool | unset | Set the minimum number of the slider. |
max | String | unset | Set the maximum number of the slider |
step | String | unset | The stepping interval |
toptext | String | unset | Text that is centered above the slider |
righttext | String | unset | Text that is to the right of the slider |
input | Bool | BOOL | Setting to true, adds an optional input box to control the slider |
bottomtext | String | unset | Text that is below the input |
Event | Description |
---|---|
change | Will fire when the range-slider drags across the bar or when an input value is entered. |
To use these web components in your react application do the following. First install the component.
npm install --save @pearson-ux/range-slider
Import your component on the page you would like to use it on
import "@pearson-ux/range-slider";
Then use the markup in your JSX code. You can pass props in to available API attributes.
render () {
return (
<div>
<pearson-range-slider min="0" max="5" step="any" toptext="Target Weight" bottomtext="" righttext="lb"></pearson-range-slider>
</div>
)
}
FAQs
Input range slider web component
The npm package @pearson-ux/range-slider receives a total of 1 weekly downloads. As such, @pearson-ux/range-slider popularity was classified as not popular.
We found that @pearson-ux/range-slider 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.