
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
next-range-slider
Advanced tools
A minimal range slider component for React, compatible with NextJS.
Install using your favorite package manager:
npm install next-range-slider
Add CSS import to your file or project root (nextjs):
import 'next-range-slider/dist/main.css';
Import inside component JSX/TSX:
import { RangeSlider } from 'next-range-slider';
...
const [low, setLow] = useState(-1000);
const [high, setHigh] = useState(1000);
...
<RangeSlider
min={-1000}
max={1000}
step={100}
options={{
leftInputProps: {
value: low,
onChange: (e) => setLow(Number(e.target.value)),
},
rightInputProps: {
value: high,
onChange: (e) => setHigh(Number(e.target.value)),
},
}}
/>
...
type RangeSliderProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
min: number;
max: number;
step?: number;
options?: RangeSliderOptions;
};
type RangeSliderOptions = {
theme?: Themes;
thumb?: ThumbProps;
track?: TrackProps;
range?: RangeProps;
leftInputProps?: ReactInputProps;
rightInputProps?: ReactInputProps;
};
type ReactInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
type RangeProps = {
background?: string;
border?: string;
};
type ThumbProps = {
background?: string;
focusBackground?: string;
width?: string;
height?: string;
/** defauts to translateY(-25%) in preset theme */
transform?: string;
borderRadius?: string;
border?: string;
};
type TrackProps = {
background?: string;
width?: string;
height?: string;
transform?: string;
borderRadius?: string;
border?: string;
margin?: string;
padding?: string;
};
The component is isolated to the component file src/components/RangeSlider.tsx
and it's CSS file main.css
. You can clone and add your own default theme, as well as extend by adding more themes and tweaking css files.
FAQs
A React component for range slider, for React >=19
The npm package next-range-slider receives a total of 92 weekly downloads. As such, next-range-slider popularity was classified as not popular.
We found that next-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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.