ColorPicker

Interactive color selection widget with saturation/lightness area, hue and alpha sliders

Category: inputs · WCAG 2.2-AA · color, input, form, picker, hue, alpha

Sizes

Props

PropTypeDefaultDescription
labelsColorPickerLabelsOverrides for the component’s user-visible strings (i18n).
valuestringControlled hex color value
defaultValuestring#3b82f6The initial value when uncontrolled.
onValueChange(value: string) => voidCalled with the new value when it changes.
presetsstring[]Preset swatch colors
alphabooleantrueWhen true, enables alpha (opacity) selection.
labelstringText label for the control.
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').

Design tokens

When to use

When not to use

How to build an accessible ColorPicker in React →

Examples

Basic

<ColorPicker defaultValue="#3b82f6" onValueChange={setColor} />

With presets

<ColorPicker presets={["#ef4444", "#3b82f6", "#10b981"]} alpha={false} />

Related components

← Back to docs