JSPM

  • Created
  • Published
  • Downloads 41358
  • Score
    100M100P100Q164230F
  • License MIT

Color Colorful

Package Exports

  • @uiw/react-color-colorful

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uiw/react-color-colorful) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Color Colorful

npm bundle size npm version Open in unpkg

image

Install

npm i @uiw/react-color-colorful

Usage

import Colorful from '@uiw/react-color-colorful';

function Demo() {
  const [hex, setHex] = useState("#fff");
  return (
    <Colorful
      color={hex}
      onChange={(color) => {
        setHex(color.hex);
      }}
    />
  );
}

Props

interface ColorfulProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> {
  prefixCls?: string;
  onChange?: (color: ColorResult) => void;
  color?: string | HsvaColor;
}

License

Licensed under the MIT License.