You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

react-simple-colorpicker

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-colorpicker

Colorpicker for React


Version published
Weekly downloads
1K
decreased by-29.49%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

React-Simple-ColorPicker

A simple(r) colorpicker written using React.

A fork of react-colorpicker, but with the extra stuff removed.

Why?

  • Improved performance
  • Smaller file size (only 3.8kb gzipped)
  • Easily composed into more complex color pickers (e.g. see [example/src](example directory))
  • Bug fixes

Install

Via npm:

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

Usage

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 (
      <ColorPicker color={this.state.color} onChange={this.handleChange} opacitySlider />
    );
  },

  handleChange : function(color) {
    console.log(color); // color is rgb(a) string
    this.setState({ color : color });
  }

});

ReactDOM.render(<App initialColor="rgb(0,0,0,1)" />, document.querySelector("#app"));

Changelog

1.4.2

  • Fix warnings about use of deprecated features in React 15.5 (thanks @albertogasparin)

v1.4.1

  • Improve performance
  • Fix dragging inside elements with overflow: scroll (fixes #17)

v1.4.0

  • Upgrade to react v15

v1.3.0

  • 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

v1.2.0

  • Compatibility with react v0.14

v1.1.2

  • Drop classSet in favour of classnames module
  • Switch out tinycolor2 for pure-color
  • Improved example

v1.1.1

  • Fix issue with extreme saturation values caused by tinycolor2
  • Better propTypes
  • Some internal code cleanup

v1.1.0 (deprecated)

  • Add option for alpha slider
  • React v0.13 compatibility

v1.0.1

  • Fix broken dependencies

v1.0.0 (deprecated)

  • React v0.11 compatibility

v0.5.0

  • Small tweaks

v0.1.0

  • Forked @stayradiated's react-colorpicker
  • Remove extraneous functionality
  • Drop reflux
  • Fix a few bugs
  • Add touch support
  • Some simple perf wins with PureRenderMixin

Keywords

FAQs

Package last updated on 04 Sep 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc