
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
react-gradient-color-picker
Advanced tools
This is a simple gradient color picker integrated with react. The reason I decide to develop it since there's no usable gradient color picker on npm so far (2015/12/30). Please join me to make it better and more useful.
Please checkout the code at here.
build/
.HOST
, PORT
).npm install --save react-gradient-color-picker
[
{offset: 0.0, color: '#f00'},
{offset: 0.5, color: '#fff'},
{offset: 1.0, color: '#0f0'}
]
The color stops of the color map.
Callback called on every value change. The return value is a d3 linear color scale. Input value range is between 0 to 1. It only triggers when the stop color changes or end of dragging the handlers.
render() {
var style = {
width: '300px'
};
var stops = [
{offset: 0.0, color: '#f00'},
{offset: 0.5, color: '#fff'},
{offset: 1.0, color: '#0f0'}
];
var onChangeCallback = function onChangeCallback(colorMap) {
// var mappedColor = colorMap(0.8);
// console.log(mappedColor);
}
return (
<div style={style}>
<ReactGradientColorPicker onChange={onChangeCallback} stops={stops}/>
</div>
);
}
react-gradient-color-picker is available under MIT. See LICENSE for more details.
FAQs
react gradient color picker
The npm package react-gradient-color-picker receives a total of 153 weekly downloads. As such, react-gradient-color-picker popularity was classified as not popular.
We found that react-gradient-color-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.