Zephora UI

Form

ColorPicker

Inline color picker with a saturation/brightness pad, hue slider, hex text field and optional preset swatches. Works with #rrggbb hex values.

Import

import { ColorPicker } from "@zephora/react";

Examples

Basic

Swatches

Preset colors render as clickable swatch buttons.

Controlled

Selected: #22c55e

API

ColorPicker props

PropTypeDefaultDescription
valuestringControlled hex value ("#rrggbb").
defaultValuestring"#3b82f6"Initial hex value in uncontrolled mode.
onValueChange(hex: string) => voidCalled with the new hex value on every change.
swatchesstring[]Preset colors rendered as swatch buttons.
showInputbooleantrueShows a hex text field.
size"sm" | "md" | "lg""md"Pad scale.
disabledbooleanfalseDisables all interaction.
unstyledbooleanfalseHeadless mode — drops Zephora classes so your own CSS can style it.
…restHTMLAttributes<HTMLDivElement>Forwarded to the group wrapper element.

Keyboard

KeyAction
Arrow Left / Arrow Right (pad)Adjusts saturation.
Arrow Up / Arrow Down (pad)Adjusts brightness.
Arrow keys (hue slider)Shifts the hue by 5°.
Home / End (hue slider)Jumps to hue 0° / 360°.
Enter (hex field)Commits the typed hex value.