Pick a colour from a saturation and brightness square, a hue slider, a hex field or swatches. The value is a hex string. Keyboard and screen reader friendly.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | Current colour as hex, like "#7c3aed". Set it to control the component. | |
| defaultValue | string | "#7c3aed" | Starting colour when uncontrolled. |
| onValueChange | (hex: string) => void | Called with the new colour as lowercase hex. | |
| swatches | string[] | DEFAULT_SWATCHES | Quick-pick colours shown under the picker. Pass an empty array to hide them. |
| className | string | Extra classes added to the outer element. |