Color Picker

Swatch color picker with eight OKLCH presets, a ring on the selected swatch and listbox semantics. Works controlled or uncontrolled for theme or label colors.

src/registry/ui/color-picker.tsx/r/color-picker.json

Installation#

bash
npx shadcn@latest add @minidev/color-picker

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/color-picker.json

Usage#

tsx
import { ColorPicker } from "@/components/ui/color-picker"

export function Example() {
  return (
    <ColorPicker />
  )
}

API reference#

ColorPicker props
PropTypeDefault
valuestring-
onChange(value: string) => void-
classNamestring-

Examples#

All form components

Learn more