JSPM

  • Created
  • Published
  • Downloads 43177
  • Score
    100M100P100Q157177F
  • License MIT

Color Github Picker

Package Exports

  • @uiw/react-color-chrome

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-chrome) 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 Chrome

npm bundle size npm version Open in unpkg

Chrome Component is a subcomponent of @react-color.

react-color-chrome

Install

npm i @uiw/react-color-chorme

Usage

import Chrome from '@uiw/react-color-chrome';
import { GithubPlacement } from '@uiw/react-color-github';

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

Props

import { GithubProps } from '@uiw/react-color-github';

export enum ChromeInputType {
  HEXA = 'hexa',
  RGBA = 'rgba',
  HSLA = 'hsla',
}

export interface ChromeProps extends Omit<GithubProps, 'colors'> {
  inputType?: ChromeInputType;
}

License

Licensed under the MIT License.