Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🎨 Is a tiny color picker widget component for React apps.

License

NotificationsYou must be signed in to change notification settings

uiwjs/react-color

Repository files navigation




@uiw/react-color



React Color

Buy me a coffeeBuild & DeployCoverage StatusOpen in unpkgnpm bundle sizenpm version
react-color is a tiny color picker widget component for React apps. These components can be installed and used separately.



@uiw/react-color



Getting Started

npm i @uiw/react-color

Open in CodeSandboxOpen in Github gh-pages

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';functionDemo(){const[hex,setHex]=useState("#fff");return(<Sketchstyle={{marginLeft:20}}color={hex}onChange={(color)=>{setHex(color.hex);}}/>);}

Support dark/night Theme

[data-color-mode*='dark'] .w-color-sketch {--sketch-background:#323232!important;}[data-color-mode*='dark'] .w-color-swatch {--sketch-swatch-border-top:1px solid#525252!important;}[data-color-mode*='dark'] .w-color-block {--block-background-color:#323232!important;--block-box-shadow:rgb(000/10%)01px!important;}[data-color-mode*='dark'] .w-color-editable-input {--editable-input-label-color:#757575!important;--editable-input-box-shadow:#6161610px0px0px1px inset!important;--editable-input-color:#bbb!important;}[data-color-mode*='dark'] .w-color-github {--github-border:1px solidrgba(0,0,0,0.2)!important;--github-background-color:#323232!important;--github-box-shadow:rgb(000/15%)0px3px12px!important;--github-arrow-border-color:rgba(0,0,0,0.15)!important;}[data-color-mode*='dark'] .w-color-compact {--compact-background-color:#323232!important;}[data-color-mode*='dark'] .w-color-material {--material-background-color:#323232!important;--material-border-bottom-color:#707070!important;}[data-color-mode*='dark'] .w-color-alpha {--alpha-pointer-background-color:#6a6a6a!important;--alpha-pointer-box-shadow:rgb(000/37%)0px1px4px0px!important;}

Documentation

You can find the react-color documentationon the website.

Packages

PackageBundle size(gzip)DownloadsVersion / unpkg
@uiw/react-colornpm bundle sizenpm bundle sizenpm downloadsnpm versionOpen in unpkg
@uiw/react-color-sketchbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-sliderbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-compactbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-materialbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-colorfulbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-wheelbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-circlebundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-blockbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-chromebundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-githubbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg

Base Components

PackageBundle size(gzip)DownloadsVersion / unpkg
@uiw/react-color-saturationbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-huebundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-alphabundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-swatchbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-shade-sliderbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-editable-inputbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-editable-input-rgbabundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-editable-input-hslabundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-drag-event-interactivebundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/color-convertbundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg
@uiw/react-color-namebundle sizebundle size(gzip)npm downloadsnpm versionOpen in unpkg

Development

npm install# Installation dependenciesnpm run build# Compile all package
cd packages/color-block# listen to the component compile and output the .js file# listen for compilation output type .d.ts filenpm run watch# Monitor the compiled package `@uiw/react-block`
npm run start# development mode, listen to compile preview website instance

Contributors

As always, thanks to our amazing contributors!

Made withcontributors.

License

Licensed under the MIT License.


[8]ページ先頭

©2009-2025 Movatter.jp