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

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

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

```ts
import type { ColorSwatchPickerProps } 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 ColorSwatchPickerProps {
    readonly colors?: readonly ColorSwatchItem[] | readonly ColorSwatchGroup[] | undefined;
    readonly columns?: number | undefined;
    readonly value?: string | null | undefined;
    readonly defaultValue?: string | null | undefined;
    readonly onValueChange?: ((value: string | null, details: SwatchChangeDetails) => void) | undefined;
    readonly clearable?: boolean | undefined;
    readonly renderSwatch?: ((ctx: SwatchRenderContext) => ReactNode) | undefined;
    readonly name?: string | undefined;
    readonly form?: string | undefined;
    readonly disabled?: boolean | undefined;
    readonly localeText?: {
        readonly noColor?: string;
        readonly colorName?: (color: Color) => string;
    } | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly id?: string | undefined;
    readonly 'aria-label'?: string | undefined;
    readonly 'aria-labelledby'?: string | undefined;
    readonly ref?: Ref<HTMLDivElement> | undefined;
}
```

Members (17):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `colors` | `readonly colors?: readonly ColorSwatchItem[] \| readonly ColorSwatchGroup[] \| undefined;` | optional | Flat entries or labelled groups. Default: a 10-column palette of grays and 9 hues in 5 shades. |
| `columns` | `readonly columns?: number \| undefined;` | optional | Swatches per row. Default 10. |
| `value` | `readonly value?: string \| null \| undefined;` | optional |  |
| `defaultValue` | `readonly defaultValue?: string \| null \| undefined;` | optional |  |
| `onValueChange` | `readonly onValueChange?: ((value: string \| null, details: SwatchChangeDetails) => void) \| undefined;` | optional |  |
| `clearable` | `readonly clearable?: boolean \| undefined;` | optional | Adds a "no color" swatch first; picking it sets `null`. |
| `renderSwatch` | `readonly renderSwatch?: ((ctx: SwatchRenderContext) => ReactNode) \| undefined;` | optional | Replaces the swatch inside each option. |
| `name` | `readonly name?: string \| undefined;` | optional | Name of a hidden input carrying the value (`''` for no color). |
| `form` | `readonly form?: string \| undefined;` | optional |  |
| `disabled` | `readonly disabled?: boolean \| undefined;` | optional |  |
| `localeText` | `readonly localeText?: {     readonly noColor?: string;     readonly colorName?: (color: Color) => string; } \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `aria-label` | `readonly 'aria-label'?: string \| undefined;` | optional |  |
| `aria-labelledby` | `readonly 'aria-labelledby'?: string \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<HTMLDivElement> \| undefined;` | optional | The listbox element. |
