499
Sponsor

Color Picker

Color picker with palette, hex, and RGB input

Terminal
color-picker-demo
No opentui live preview is registered for this example yet.

Installation

$ pnpm dlx shadcn@latest add @termcn/opentui-color-picker

Usage

import { ColorPicker } from "@/components/ui/color-picker";
<ColorPicker label="Pick a color" onChange={(color) => {}} />

API Reference

ColorPicker

PropTypeDefault
valuestring-
onChange(color: string) => void-
onSubmit(color: string) => void-
labelstring-
palettestring[]DEFAULT_PALETTE
autoFocusbooleanfalse
idstring-