{"repo":"mapbox/react-colorpickr","free":true,"listed":false,"github":"https://github.com/mapbox/react-colorpickr","clone":"git clone https://github.com/mapbox/react-colorpickr.git","description":"A themeable colorpicker with HSL and RGB support for React","language":"TypeScript","stars":207,"topics":["hsl","color-picker","rgba","hsla","rgb","react","rgba-values","colorpicker","color"],"license":"ISC","category":"ui-components","readme_excerpt":"A colorpicker for React --- Demo Install npm install @mapbox/react-colorpickr You'll also want to include a copy of colorpickr.css in your code. Usage Required properties onChange (color) = void Value should be a function and is called whenever a color is updated from the colorpicker. Returns a color object. Optional properties theme Object By default, react-colorpickr depends on Assembly and the CSS located in dist/colorpickr.css . You can however, override it thanks to react-themeable which react-colorpickr uses internally. See the properties used and the class name values in theme.ts . initialValue string Accepts any valid css color. If this isn't provided, a default color is used. colorSpace 'hsl' 'rgb' 'hex' Initializes what should be displaed in the bottom color input. Defaults to hex . mode 'disc' 'values' Initializes which view tab is active. Defaults to disc . eyedropper boolean When true , an eyedropper is added to the top-right of the interface. Defaults to true . reset boolean When true , a reset button is added that when pressed, reverts to the initialized color. Defaults to true . alpha boolean When true , a alpha range slider and input is provided. Defatuls to true . mounted (ColorPickr) = void To use internal methods from react-colorpickr, mounted provides access to the components instance. This is helpful for calling methods like overrideValue that can manually set a new color. discRadius number Optional property to provide a different disc radius for selecti","default_branch":null,"files":null,"tree":[],"storefront":"/r/mapbox","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mapbox/react-colorpickr/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}