Package Exports
- @uiw/react-color-colorful
- @uiw/react-color-colorful/cjs/index.js
- @uiw/react-color-colorful/esm/index.js
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
Colorful Component is a subcomponent of @react-color
.
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
import React from 'react';
import { HsvaColor, ColorResult } from '@uiw/color-convert';
export interface ColorfulProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> {
prefixCls?: string;
onChange?: (color: ColorResult) => void;
color?: string | HsvaColor;
}
License
Licensed under the MIT License.