Gathering detailed insights and metrics for @uiw/react-color-wheel
Gathering detailed insights and metrics for @uiw/react-color-wheel
Gathering detailed insights and metrics for @uiw/react-color-wheel
Gathering detailed insights and metrics for @uiw/react-color-wheel
🎨 Is a tiny color picker widget component for React apps.
npm install @uiw/react-color-wheel
Typescript
Module System
Node Version
NPM Version
93.8
Supply Chain
93.8
Quality
92.8
Maintenance
100
Vulnerability
100
License
TypeScript (98.36%)
HTML (0.98%)
CSS (0.63%)
Less (0.04%)
Built with Next.js • Fully responsive • SEO optimized • Open source ready
Total Downloads
2,135,047
Last Day
1,422
Last Week
45,758
Last Month
207,700
Last Year
1,628,027
MIT License
442 Stars
506 Commits
120 Forks
4 Watchers
9 Branches
19 Contributors
Updated on Sep 05, 2025
Latest Version
2.8.0
Package Id
@uiw/react-color-wheel@2.8.0
Unpacked Size
44.36 kB
Size
8.98 kB
File Count
17
NPM Version
10.8.2
Node Version
20.19.4
Published on
Aug 19, 2025
Cumulative downloads
Total Downloads
Last Day
-26.8%
1,422
Compared to previous day
Last Week
-13.9%
45,758
Compared to previous week
Last Month
-2%
207,700
Compared to previous month
Last Year
299.6%
1,628,027
Compared to previous year
2
3
1
Wheel Component is a subcomponent of @react-color
.
1npm i @uiw/react-color-wheel
1import React, { useState, Fragment } from 'react'; 2import Wheel from '@uiw/react-color-wheel'; 3import { hsvaToHex } from '@uiw/color-convert'; 4 5function Demo() { 6 const [hsva, setHsva] = useState({ h: 214, s: 43, v: 90, a: 1 }); 7 return ( 8 <Fragment> 9 <Wheel color={hsva} onChange={(color) => setHsva({ ...hsva, ...color.hsva })} /> 10 <div style={{ width: '100%', height: 34, marginTop: 20, background: hsvaToHex(hsva) }}></div> 11 </Fragment> 12 ); 13} 14 15export default Demo;
1import React, { useState } from 'react'; 2import Wheel from '@uiw/react-color-wheel'; 3import { hsvaToHex } from '@uiw/color-convert'; 4 5function Demo() { 6 const [hsva, setHsva] = useState({ h: 214, s: 43, v: 90, a: 1 }); 7 return ( 8 <div style={{ display: 'grid', gap: 20, gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))' }}> 9 <Wheel color={{a: 1, h: 214, s: 0, v: 100}} /> 10 <Wheel color={{a: 1, h: 214, s: 0, v: 90}} /> 11 <Wheel color={{a: 1, h: 214, s: 0, v: 80}} /> 12 <Wheel color={{a: 1, h: 214, s: 0, v: 70}} /> 13 <Wheel color={{a: 1, h: 214, s: 0, v: 50}} /> 14 <Wheel color={{a: 1, h: 214, s: 0, v: 40}} /> 15 <Wheel color={{a: 1, h: 214, s: 0, v: 40}} width={100} height={100} /> 16 <Wheel color={{a: 1, h: 214, s: 0, v: 30}} width={100} height={100} /> 17 <Wheel color={{a: 1, h: 214, s: 0, v: 20}} width={100} height={100} /> 18 <Wheel color={{a: 1, h: 214, s: 0, v: 10}} width={100} height={100} /> 19 </div> 20 ); 21} 22 23export default Demo;
1import React, { useState, Fragment } from 'react'; 2import Wheel from '@uiw/react-color-wheel'; 3import ShadeSlider from '@uiw/react-color-shade-slider'; 4import { hsvaToHex } from '@uiw/color-convert'; 5 6function Demo() { 7 const [hsva, setHsva] = useState({ h: 214, s: 43, v: 90, a: 1 }); 8 return ( 9 <Fragment> 10 <Wheel color={hsva} onChange={(color) => setHsva({ ...hsva, ...color.hsva })} /> 11 <ShadeSlider 12 hsva={hsva} 13 style={{ width: 210, marginTop: 20 }} 14 onChange={(newShade) => { 15 setHsva({ ...hsva, ...newShade }); 16 }} 17 /> 18 <div style={{ width: '100%', height: 34, marginTop: 20, background: hsvaToHex(hsva) }}></div> 19 </Fragment> 20 ); 21} 22 23export default Demo;
1import React, { useState, Fragment } from 'react'; 2import Wheel from '@uiw/react-color-wheel'; 3import ShadeSlider from '@uiw/react-color-shade-slider'; 4import { hsvaToHex } from '@uiw/color-convert'; 5 6function Demo() { 7 const [hsva, setHsva] = useState({ h: 214, s: 43, v: 90, a: 1 }); 8 return ( 9 <Fragment> 10 <Wheel 11 color={hsva} 12 onChange={(color) => setHsva({ ...hsva, ...color.hsva })} 13 /* Passing the style prop is required in the topmost element. */ 14 pointer={({ color, style }) => { 15 return ( 16 <div style={style}> 17 <div 18 style={{ 19 width: 12, 20 height: 12, 21 transform: 'translate(-5px, -5px)', 22 backgroundColor: color, 23 border: '1px solid #000', 24 }} 25 /> 26 </div> 27 ); 28 }} 29 /> 30 <ShadeSlider 31 hsva={hsva} 32 style={{ width: 210, marginTop: 20 }} 33 onChange={(newShade) => { 34 setHsva({ ...hsva, ...newShade }); 35 }} 36 /> 37 <div style={{ width: '100%', height: 34, marginTop: 20, background: hsvaToHex(hsva) }}></div> 38 </Fragment> 39 ); 40} 41 42export default Demo;
1import React from 'react'; 2import { HsvaColor, ColorResult } from '@uiw/color-convert'; 3import type * as CSS from 'csstype'; 4import { PointerProps } from './Pointer'; 5export interface WheelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> { 6 prefixCls?: string; 7 color?: string | HsvaColor; 8 width?: number; 9 height?: number; 10 radius?: CSS.Properties<string | number>['borderRadius']; 11 /** Direction of the oval: 'x' or 'y'. */ 12 oval?: string; 13 /** Starting angle of the color wheel's hue gradient, measured in degrees. */ 14 angle?: number; 15 /** Direction of the color wheel's hue gradient; either clockwise or anticlockwise. Default: `anticlockwise` */ 16 direction?: 'clockwise' | 'anticlockwise'; 17 /** Passing the style prop is required in the topmost element. */ 18 pointer?: ({ color, style }: PointerProps) => JSX.Element; 19 onChange?: (color: ColorResult) => void; 20} 21declare const Wheel: React.ForwardRefExoticComponent<WheelProps & React.RefAttributes<HTMLDivElement>>; 22export default Wheel;
As always, thanks to our amazing contributors!
Made with contributors.
Licensed under the MIT License.
No vulnerabilities found.