2.0.0 • Published 2 years ago

color-picker-menu v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Color Picker Menu

Image

Demo

Live Demo

Installation & Usage

npm install color-picker-menu --save

OR

yarn add color-picker-menu

Include the Component

import React from 'react';
import { ColorPickerMenu } from 'color-picker-menu';

const Component = () => {
  return <ColorPickerMenu />;
};

Properties

  • None of the properties are required
  • Any color passed should be in HEX format
PropertyDescriptionDefaultType
refreference of the button which opens the color picker menu. The position of the menu is based on this reference.
themelight or darklightstring
colorsarray
selectedstring
removeColortransparent or any colorstring
enableAddNewtrueboolean
defaultFormathex, rgb, or hslhexstring
allowedFormats['hex', 'rgb', 'hsl']array
itemsPerRow6number
onChangewhen color is changed via click or SAVE button. It returns an object with hex, rgb and hsl values.func
onHidewhen the detected click is outside the color pickerfunc