# color-picker-menu

> Color picker in a popover for React

Latest version **2.0.0** (published 2022-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install color-picker-menu
pnpm add color-picker-menu
yarn add color-picker-menu
bun add color-picker-menu
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-02-07 |
| First published | 2022-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 58.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Osama Shahi |
| Maintainers | osamaashahi |
| Keywords | color picker, react color picker, react color, react color picker menu, color picker menu |

## Links

- npm: https://www.npmjs.com/package/color-picker-menu
- Repository: https://github.com/osamaashahi/color-picker-menu
- Homepage: https://github.com/osamaashahi/color-picker-menu#readme
- Issues: https://github.com/osamaashahi/color-picker-menu/issues
- npm.io page: https://npm.io/package/color-picker-menu

## Dependencies (3)

- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [tinycolor2](https://npm.io/package/tinycolor2.md) ^1.4.2
- [styled-components](https://npm.io/package/styled-components.md) ^5.3.3

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-02-07
- 1.3.0 — 2022-02-03
- 1.2.4 — 2022-02-02
- 1.2.3 — 2022-02-02
- 1.2.2 — 2022-02-02
- 1.2.1 — 2022-02-02
- 1.2.0 — 2022-02-02
- 1.1.0 — 2022-02-01
- 1.0.0 — 2022-01-31

## README

# Color Picker Menu
![Image](https://i.imgur.com/Zs63Ehr.png)
## Demo
##### [Live Demo](https://codesandbox.io/s/color-picker-menu-0fzhd)

## Installation & Usage

```sh
npm install color-picker-menu --save
```
OR
```sh
yarn add color-picker-menu
```

#### Include the Component

```js
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

| Property | Description | Default | Type |
| - | - | - | - |
| `ref` | reference of the button which opens the color picker menu. The position of the menu is based on this reference.  |||
| `theme` | `light` or `dark` | `light` | string |
| `colors` ||| array |
| `selected` ||| string |
| `removeColor` | `transparent` or any color  || string |
| `enableAddNew` ||`true`| boolean |
| `defaultFormat` | `hex`, `rgb`, or `hsl`  |`hex`| string |
| `allowedFormats` ||`['hex', 'rgb', 'hsl']`| array |
| `itemsPerRow` ||`6`| number |
| `onChange` |  when color is changed via click or `SAVE` button. It returns an object with `hex`, `rgb` and `hsl` values.   || func |
| `onHide` | when the detected click is outside the color picker || func |

---
_Source: https://npm.io/package/color-picker-menu · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
