React input color component with hsv color picker

React input color component with hsv color picker

The color picker is inspired by the sketch color picker.

react-input-color

npm npm Build Status codecov styled with prettier

React input color component with hsv color picker

The color picker is inspired by the sketch color picker

screenshot

Installation

npm install react-input-color --save
yarn add react-input-color

Demo

https://code.swiftcarrot.com/react-input-color

Usage

Check app.js for a working example.

import React from 'react';
import { ColorPicker } from 'react-input-color';

function App() {
  const [color, setColor] = React.useState({});

  return (
    <div>
      <ColorPicker initialHexColor="#5e72e4" onChange={setColor} />
      <div
        style={{
          width: 50,
          height: 50,
          marginTop: 20,
          backgroundColor: color.hex
        }}
      />
    </div>
  );
}

License

MIT

Github Repository

Tags: #React #Color