Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@rc-component/color-picker

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rc-component/color-picker

React Color Picker

Source
npmnpm
Version
3.0.2
Version published
Weekly downloads
1.6M
3.02%
Maintainers
5
Weekly downloads
 
Created
Source

@rc-component/color-picker

React Color Picker.

NPM version dumi build status Test coverage npm download bundle size

install

@rc-component/color-picker

Development

npm install
npm start

Example

http://localhost:8000

Usage

import ColorPicker from '@rc-component/color-picker';
import '@rc-component/color-picker/assets/index.css';

export default () => <ColorPicker />;

API

PropertyDescriptionTypeDefault
valueValue of colorstring | Color-
defaultValueDefault value of colorstring | Color-
onChangeCallback when value is changed(value: Color, type: hue | alpha) => void-
onChangeCompleteCallback when drag is stop(value: Color, type: hue | alpha) => void-
disabledDisabled ColorPickerbooleanfalse
disabledAlphaDisabled alpha sliderbooleanfalse
panelRenderCustom panel render(panel: React.ReactElement) => React.ReactElement-

Color

PropertyDescriptionTypeDefault
toHexStringConvert to hex format color string, like #ffffff() => string-
toHsbConvert to hsb object, like { h: 0, s: 0, b: 0, a: 0 }() => ({ h: number, s: number, b: number, a number })-
toHsbStringConvert to hsb format color string, like hsba(0, 0%, 0%, 0)() => string-
toRgbConvert to rgb object, like { r: 0, g: 0, b: 0, a: 0 }() => ({ r: number, g: number, b: number, a number })-
toRgbStringConvert to rgb format color string, like rgba(0, 0, 0, 0)() => string-

Test Case

npm test
or
npm run coverage

License

@rc-component/color-picker is released under the MIT license.

Keywords

react

FAQs

Package last updated on 19 Sep 2025

Did you know?

Socket

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.

Install

Related posts