Color picker
CoreA swatch that grows into a picker with format morphing, eyedropper, saved swatches, and contrast readout.
pnpm dlx shadcn@latest add https://wui.alann.works/r/color-picker.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
value | string | — |
defaultValue | string | — |
onValueChange | (hex: string) => void | — |
background | string | — |
label | string | — |
swatches | ColorSwatch[] | — |
defaultSwatches | ColorSwatch[] | — |
onSwatchesChange | (swatches: ColorSwatch[]) => void | — |
maxSwatches | number | 7, defaultFormat = "hex", className |
defaultFormat | ColorFormat | — |
className | string | — |