Colorpicker for React
npm install react-simple-colorpicker> A simple(r) colorpicker written using React.
A fork of react-colorpicker, but with the extra stuff removed.
* Improved performance
* Smaller file size (only 3.8kb gzipped)
* Easily composed into more complex color pickers (e.g. see example/src)
* Bug fixes
Via npm:
``bash`
npm install react-simple-colorpicker --save
Or if you want a UMD-compatible served from a CDN:
https://unpkg.com/react-simple-colorpicker/umd/index.js
`javascript
var React = require("react");
var ReactDOM = require("react-dom");
var ColorPicker = require("react-simple-colorpicker");
var App = React.createClass({
getInitialState : function() {
return {
color : this.props.initialColor
};
},
render : function() {
return (
);
},
handleChange : function(color) {
console.log(color); // color is rgb(a) string
this.setState({ color : color });
}
});
ReactDOM.render(
`
* Fix warnings about use of deprecated features in React 15.5 (thanks @albertogasparin)
* Improve performance
* Fix dragging inside elements with overflow: scroll (fixes #17)
* Upgrade to react v15
* react and react-dom now peer dependencies (fixes #9)
* Performance improvements
* Will now work if rendered into an iframe from another document
* Switch to webpack
* Add release script
* Compatibility with react v0.14
* Drop classSet in favour of classnames` module
* Switch out tinycolor2 for pure-color
* Improved example
* Fix issue with extreme saturation values caused by tinycolor2
* Better propTypes
* Some internal code cleanup
* Add option for alpha slider
* React v0.13 compatibility
* Fix broken dependencies
* React v0.11 compatibility
* Small tweaks
* Forked @stayradiated's react-colorpicker
* Remove extraneous functionality
* Drop reflux
* Fix a few bugs
* Add touch support
* Some simple perf wins with PureRenderMixin