JSPM

  • Created
  • Published
  • Downloads 38653
  • Score
    100M100P100Q151737F
  • License MIT

Color Picker component for React.

Package Exports

  • @uiw/react-color

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) 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 is a tiny color picker component for React apps.

Getting Started

npm i @uiw/react-color

Open in CodeSandbox

import { Slider, Sketch, Material, Colorful, Compact } from '@uiw/react-color';
import { Alpha, Hue, ShadeSlider, Saturation, Interactive, hsvaToHslaString } from '@uiw/react-color';

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

Packages

Package Bundle size(gzip) Version / unpkg
@uiw/react-color npm bundle size npm bundle size npm version Open in unpkg
@uiw/react-color-sketch bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-slider bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-compact bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-material bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-colorful bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-saturation bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-hue bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-alpha bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-shade-slider bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-editable-input bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-color-editable-input-rgba bundle size bundle size(gzip) npm version Open in unpkg
@uiw/react-drag-event-interactive bundle size bundle size(gzip) npm version Open in unpkg
@uiw/color-convert bundle size bundle size(gzip) npm version Open in unpkg

License

Licensed under the MIT License.