Giter Site home page Giter Site logo

plyo / react-color Goto Github PK

View Code? Open in Web Editor NEW

This project forked from casesandberg/react-color

0.0 14.0 0.0 2.13 MB

Color Pickers from Sketch, Photoshop, Chrome & more

Home Page: http://casesandberg.github.io/react-color/

License: MIT License

JavaScript 85.57% HTML 14.43%

react-color's Introduction

  • 7 Different Pickers - Sketch, Photoshop, Chrome and many more

  • Popup or Block - It can be used it as a popup or always visible

  • Make Your Own - Use the building block components to make your own

Sketch and Photoshop Color Picker Built in React

Installation & Usage

npm install react-color --save

Include the Component

var React = require('react');
var ColorPicker = require('react-color');

class Component extends React.Component {

  render() {
    return <ColorPicker type="sketch" />;
  }
}

Display It

Display the color picker popup on click, or don't define display and it will always be visible.

var React = require('react');
var ColorPicker = require('react-color');

class Component extends React.Component {

  constructor() {
    super();
    this.state = {
      displayColorPicker: false,
    };
    this.handleClick = this.handleClick.bind(this);
  }

  handleClick() {
    this.setState({ displayColorPicker: !this.state.displayColorPicker });
  }

  render() {
    return (
      <div>
        <button onClick={ this.handleClick }>Pick Color</button>
        <ColorPicker display={ this.state.displayColorPicker } type="sketch" />
      </div>
    );
  }
}

100% inline styles via ReactCSS

react-color's People

Contributors

casesandberg avatar akx avatar jonathanmatthey avatar b2whats avatar

Watchers

Konstantin Tarkus avatar Andrey Balakirev avatar Vladimir Balakirev avatar Alexander Savin avatar Vladimir Kutepov avatar James Cloos avatar Andrew Red avatar  avatar Aksel G. Gresvig avatar SergeI Grozov avatar Alexandr Antonov avatar  avatar Herman avatar Alexey Zaitsev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.