Color picker

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.

ColorPicker3D props

PropTypeDefaultDescription
valuestringCurrent colour as hex, like "#7c3aed". Set it to control the component.
defaultValuestring"#7c3aed"Starting colour when uncontrolled.
onValueChange(hex: string) => voidCalled with the new colour as lowercase hex.
swatchesstring[]DEFAULT_SWATCHESQuick-pick colours shown under the picker. Pass an empty array to hide them.
classNamestringExtra classes added to the outer element.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks