colors picker ui component for react
IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
npm install
npm start
online example: http://react-component.github.io/react-colors-picker/
- support color mode RGB HSB HSL
var ColorsPicker = require('react-colors-picker');
var React = require('react');
React.render(<ColorsPicker />, container);
name | type | default | description |
---|---|---|---|
adjustOrientOnPickerOverflow | Boolean | true | whether adjust picker orient if there is not enough space to show. |
defaultColor | String | #ff0000 | color board default background color |
color | String | #ff0000 | color board current background color |
orient | String[] | ['top', 'left'] | Picker show direction of trigger |
onChange | Function | noop | when select color |
trigger | Node | <span className='react-colorpicker-trigger'></span> |
additional trigger appended to picker |
name | type | default | description |
---|---|---|---|
defaultColor | String | #ff0000 | color board default background color |
color | String | #ff0000 | color board current background color |
style | Object | {} | root node CSS style |
onChange | Function | when select color trigger | |
onFocus | Function | when picker focus trigger | |
onBlur | Function | when picker loose focus |
react-colors-picker is released under the MIT license.