Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@uiw/react-color-slider
Advanced tools
Slider Component is a subcomponent of @react-color
.
npm i @uiw/react-color-slider
import React, { useState } from 'react';
import Slider from '@uiw/react-color-slider';
export default function Demo() {
const [hsva, setHsva] = useState({ h: 0, s: 0, v: 68, a: 1 });
return (
<Slider
color={hsva}
onChange={(color) => {
setHsva({ ...hsva, ...color.hsv });
}}
/>
);
}
import React, { useState } from 'react';
import Slider from '@uiw/react-color-slider';
import Wheel from '@uiw/react-color-wheel';
export default function Demo() {
const [hsva, setHsva] = useState({ h: 0, s: 0, v: 68, a: 1 });
return (
<>
<Slider
color={hsva}
style={{ paddingBottom: 10 }}
onChange={(color) => {
setHsva({ ...hsva, ...color.hsv });
}}
/>
<Wheel
color={hsva}
onChange={(color) => setHsva({ ...hsva, ...color.hsva })}
/>
</>
);
}
import React from 'react';
import { ColorResult, HsvaColor } from '@uiw/color-convert';
export interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> {
prefixCls?: string;
color?: string | HsvaColor;
lightness?: number[];
onChange?: (color: ColorResult, evn: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
}
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
export default Slider;
As always, thanks to our amazing contributors!
Made with contributors.
Licensed under the MIT License.
FAQs
Color Slider component for React.
The npm package @uiw/react-color-slider receives a total of 18,443 weekly downloads. As such, @uiw/react-color-slider popularity was classified as popular.
We found that @uiw/react-color-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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.