React Color
react-color is a tiny color picker widget component for React apps. These components can be installed and used separately.
Getting Started
npm i @uiw/react-color
import { Slider, Sketch, Material, Colorful, Compact, Circle, Wheel, Block, Github, Chrome } from '@uiw/react-color';
import { Alpha, Hue, ShadeSlider, Saturation, Interactive, hsvaToHslaString } from '@uiw/react-color';
import { EditableInput, EditableInputRGBA, EditableInputHSLA } from '@uiw/react-color';
function Demo() {
const [hex, setHex] = useState("#fff");
return (
<Sketch
style={{ marginLeft: 20 }}
color={hex}
onChange={(color) => {
setHex(color.hex);
}}
/>
);
}
Packages
Base Components
Development
npm install
npm run build
cd packages/color-block
npm run watch
npm run start
License
Licensed under the MIT License.