@rc-component/color-picker
React Color Picker
Last updated 2 years ago by madccc .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @rc-component/color-picker 
SYNC missed versions from official npm registry.

@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

Property Description Type Default
value Value of color string | Color -
defaultValue Default value of color string | Color -
onChange Callback when value is changed (value: Color, type: hue \| alpha) => void -
onChangeComplete Callback when drag is stop (value: Color, type: hue \| alpha) => void -
disabled Disabled ColorPicker boolean false
disabledAlpha Disabled alpha slider boolean false
panelRender Custom panel render (panel: React.ReactElement) => React.ReactElement -

Color

Property Description Type Default
toHexString Convert to hex format color string, like #ffffff () => string -
toHsb Convert to hsb object, like { h: 0, s: 0, b: 0, a: 0 } () => ({ h: number, s: number, b: number, a number }) -
toHsbString Convert to hsb format color string, like hsba(0, 0%, 0%, 0) () => string -
toRgb Convert to rgb object, like { r: 0, g: 0, b: 0, a: 0 } () => ({ r: number, g: number, b: number, a number }) -
toRgbString Convert 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.

Current Tags

  • 2.0.1                                ...           latest (5 months ago)

35 Versions

  • 2.0.1                                ...           5 months ago
  • 2.0.0                                ...           5 months ago
  • 1.9.0                                ...           5 months ago
  • 1.8.3                                ...           5 months ago
  • 1.8.2                                ...           5 months ago
  • 1.8.1                                ...           5 months ago
  • 1.8.0                                ...           5 months ago
  • 1.7.1                                ...           5 months ago
  • 1.7.0                                ...           5 months ago
  • 1.6.1                                ...           5 months ago
  • 1.6.0                                ...           6 months ago
  • 1.5.3                                ...           9 months ago
  • 1.5.2                                ...           10 months ago
  • 1.5.1                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-alpha.11                                ...           2 years ago
  • 1.0.0-alpha.10                                ...           2 years ago
  • 1.0.0-alpha.9                                ...           2 years ago
  • 1.0.0-alpha.8                                ...           2 years ago
  • 1.0.0-alpha.7                                ...           2 years ago
  • 1.0.0-alpha.6                                ...           2 years ago
  • 1.0.0-alpha.5                                ...           2 years ago
  • 1.0.0-alpha.4                                ...           2 years ago
  • 1.0.0-alpha.3                                ...           2 years ago
  • 1.0.0-alpha.2                                ...           2 years ago
  • 1.0.0-alpha.1                                ...           2 years ago
Downloads
Total 21
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (23)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE