# ColorFieldProps (@salmonui/inputs/color-picker)

> The ColorFieldProps interface of @salmonui/inputs/color-picker.

Canonical: https://salmonui.dev/docs/reference/inputs/color-picker/ColorFieldProps

```ts
import type { ColorFieldProps } from '@salmonui/inputs/color-picker';
```

Entry index: https://salmonui.dev/docs/reference/inputs/color-picker (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/inputs/color-picker.md).

## Reference

Kind: interface

```ts
interface ColorFieldProps extends FieldCommonProps, NativeInput {
    readonly value?: ColorInput | null | undefined;
    readonly defaultValue?: ColorInput | null | undefined;
    readonly onValueChange?: ((value: string | null, details: ColorFieldChangeDetails) => void) | undefined;
    readonly valueFormat?: ColorFormat | undefined;
    readonly clearable?: boolean | undefined;
    readonly showSwatch?: boolean | undefined;
    readonly endAdornment?: ReactNode;
    readonly localeText?: (FieldValidationText & {
        readonly clear?: string;
        readonly colorName?: (color: Color) => string;
    }) | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly classNames?: {
        readonly group?: string;
        readonly input?: string;
        readonly label?: string;
        readonly description?: string;
        readonly error?: string;
    } | undefined;
    readonly ref?: Ref<HTMLInputElement> | undefined;
}
```

Members (19):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value?: ColorInput \| null \| undefined;` | optional |  |
| `defaultValue` | `readonly defaultValue?: ColorInput \| null \| undefined;` | optional |  |
| `onValueChange` | `readonly onValueChange?: ((value: string \| null, details: ColorFieldChangeDetails) => void) \| undefined;` | optional | Called with the entry in `valueFormat` after it parses (blur or Enter), or null when emptied. |
| `valueFormat` | `readonly valueFormat?: ColorFormat \| undefined;` | optional | Format of the shown and reported value. Default `'hexa'`. |
| `clearable` | `readonly clearable?: boolean \| undefined;` | optional |  |
| `showSwatch` | `readonly showSwatch?: boolean \| undefined;` | optional | A `ColorSwatch` of the value as the start adornment. Default true. |
| `endAdornment` | `readonly endAdornment?: ReactNode;` | optional |  |
| `localeText` | `readonly localeText?: (FieldValidationText & {     readonly clear?: string;     readonly colorName?: (color: Color) => string; }) \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `classNames` | `readonly classNames?: {     readonly group?: string;     readonly input?: string;     readonly label?: string;     readonly description?: string;     readonly error?: string; } \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<HTMLInputElement> \| undefined;` | optional | The native `<input>`. |
| `label` | `label?: ReactNode;` | optional, inherited |  |
| `description` | `description?: ReactNode;` | optional, inherited |  |
| `errorMessage` | `errorMessage?: ((ctx: { readonly errors: readonly string[]; }) => ReactNode) \| ReactNode;` | optional, inherited | Error text (or a function of the errors) shown while the field is invalid. |
| `invalid` | `invalid?: boolean;` | optional, inherited | Forces the error state. |
| `validation` | `validation?: FieldValidation;` | optional, inherited | Rules in the Data Grid vocabulary. |
| `validateOn` | `validateOn?: ValidateOn;` | optional, inherited | When errors appear; default the `Form`'s, else `'blur'`. |
| `size` | `size?: FieldSize;` | optional, inherited | Metric set. Default `'md'`. |
