1.0.2 • Published 1 year ago

react-color-picker-component v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React Color Picker Component

A simple React Color Picker component.

Installation

To install the component, run:

npm i react-color-picker-component

Usage

Here's a basic example of how to use the color picker component in your React application:

import React, { useState } from 'react';
import ColorPicker from 'react-color-picker-component';

const App = () => {
  const [color, setColor] = useState('#000000');

  return (
    <div>
      <h1>React Color Picker</h1>
      <ColorPicker initialColor={color} onChange={setColor} />
      <p>Selected Color: {color}</p>
    </div>
  );
};

export default App;

Props

PropTypeDefaultDescription
initialColorstring#000000The initial color value.
onChangefunctionnullCallback when the color changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Author

Shyaka Chaste - shyakachaste.me

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago