Security News
npm Updates Search Experience with New Objective Sorting Options
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
react-color-palette
Advanced tools
Color picker for React
npm install react-color-palette styled-components
yarn add react-color-palette styled-components
import React from "react";
import ColorPicker, { useColorObject } from "react-color-palette";
export const App = () => {
const [color, setColor] = useColorObject("hex", "#121212");
return <ColorPicker width={400} color={color} onChange={setColor} />;
};
Prop | Type | Description |
---|---|---|
width | number | The width of the color picker. |
[height] | number | The height of the color picker. |
color | ColorObject | Color in the ColorObject . |
onChange | (color: ColorObject ) => void | The function that accepts the updated ColorObject as a single argument. |
Param | Type | Description |
---|---|---|
model | ColorModels | Color model. |
initialColor | ColorObject[model] | The initial color in the selected color model. |
Code released under the MIT license.
FAQs
🎨 Lightweight Color Picker component for React.
The npm package react-color-palette receives a total of 30,261 weekly downloads. As such, react-color-palette popularity was classified as popular.
We found that react-color-palette 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
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.