Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/color-picker.json
Usage
import { ColorPicker } from "@/components/ui/color-picker";<ColorPicker label="Pick a color" onChange={(color) => {}} />API Reference
ColorPicker
| Prop | Type | Default |
|---|---|---|
value | string | undefined |
onChange | (color: string) => void | undefined |
onSubmit | (color: string) => void | undefined |
label | string | undefined |
palette | string[] | DEFAULT_PALETTE |
autoFocus | boolean | false |
id | string | undefined |