Form Color Input
GitHubColor input connected to Form context with server validation errors.
Installation
bash
pnpm dlx shadcn@latest add @cs/form-color-inputUsage
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
| Name | Type | Default | Description |
|---|---|---|---|
| defaultValue | string | undefined | - | - |
| icon | ReactNode | - | Icon displayed inside the input on the left. |
| inputClassName | string | undefined | - | Additional classes applied to the native input control. |
| label | ReactNode | - | 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. |
| value | string | undefined | - | - |