Form Color Input

GitHub

Color input connected to Form context with server validation errors.

Installation

bash
pnpm dlx shadcn@latest add @cs/form-color-input

Usage

tsx
import { FormColorInput } from "@/components/cs/form-color-input"
tsx
<FormColorInput name="color" />

API Reference

FormColorInput

Color input connected to Form context with server validation errors.

Props

NameTypeDefaultDescription
defaultValuestring | undefined--
iconReactNode-Icon displayed inside the input on the left.
inputClassNamestring | undefined-Additional classes applied to the native input control.
labelReactNode-Field label and fallback placeholder.
name *string-Form field name used for submission and validation errors.
onValueChange((value: string) => void) | undefined--
orientation"vertical" | "horizontal" | "responsive" | null | undefined-Layout of the field label and input control.
valuestring | undefined--