# SignaturePadProps (@salmonui/inputs/signature-pad)

> The SignaturePadProps interface of @salmonui/inputs/signature-pad.

Canonical: https://salmonui.dev/docs/reference/inputs/signature-pad/SignaturePadProps

```ts
import type { SignaturePadProps } from '@salmonui/inputs/signature-pad';
```

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

## Reference

Kind: interface

```ts
interface SignaturePadProps extends FieldCommonProps {
    readonly value?: string | null | undefined;
    readonly defaultValue?: string | null | undefined;
    readonly onValueChange?: ((value: string | null, details: SignatureChangeDetails) => void) | undefined;
    readonly strokeColor?: string | undefined;
    readonly minStrokeWidth?: number | undefined;
    readonly maxStrokeWidth?: number | undefined;
    readonly velocity?: number | undefined;
    readonly backgroundColor?: string | undefined;
    readonly backgroundImage?: string | undefined;
    readonly height?: number | string | undefined;
    readonly toolbar?: boolean | undefined;
    readonly fontFamily?: string | undefined;
    readonly name?: string | undefined;
    readonly form?: string | undefined;
    readonly required?: boolean | undefined;
    readonly disabled?: boolean | undefined;
    readonly readOnly?: boolean | undefined;
    readonly localeText?: SignaturePadLocaleText | undefined;
    readonly id?: string | undefined;
    readonly dir?: 'ltr' | 'rtl' | 'auto' | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly classNames?: {
        readonly label?: string;
        readonly surface?: string;
        readonly canvas?: string;
        readonly toolbar?: string;
        readonly description?: string;
        readonly error?: string;
    } | undefined;
    readonly ref?: Ref<SignaturePadApi> | undefined;
}
```

Members (31):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `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'`. |
| `value` | `readonly value?: string \| null \| undefined;` | optional | Controlled signature as a data URL (`null` empty). |
| `defaultValue` | `readonly defaultValue?: string \| null \| undefined;` | optional |  |
| `onValueChange` | `readonly onValueChange?: ((value: string \| null, details: SignatureChangeDetails) => void) \| undefined;` | optional | After a stroke, undo, redo, clear, load, typed text or reset, with the PNG data URL (`null` empty). |
| `strokeColor` | `readonly strokeColor?: string \| undefined;` | optional | Default `'#000000'` (image data, not theme). |
| `minStrokeWidth` | `readonly minStrokeWidth?: number \| undefined;` | optional | Default 0.5. |
| `maxStrokeWidth` | `readonly maxStrokeWidth?: number \| undefined;` | optional | Default 2.5. |
| `velocity` | `readonly velocity?: number \| undefined;` | optional | Velocity filter weight 0..1; higher follows speed changes faster. Default 0.7. |
| `backgroundColor` | `readonly backgroundColor?: string \| undefined;` | optional | Canvas fill. Default none (transparent). |
| `backgroundImage` | `readonly backgroundImage?: string \| undefined;` | optional | Image drawn under the strokes, stretched to the pad. Same-origin or CORS-enabled. |
| `height` | `readonly height?: number \| string \| undefined;` | optional | Pad height (CSS length or px). Default 160. |
| `toolbar` | `readonly toolbar?: boolean \| undefined;` | optional | Shows the Clear button and the "type your name" toggle. Default true. |
| `fontFamily` | `readonly fontFamily?: string \| undefined;` | optional | Font of typed text. Default `'cursive'`. |
| `name` | `readonly name?: string \| undefined;` | optional | Submits the PNG data URL (empty when there is no signature). |
| `form` | `readonly form?: string \| undefined;` | optional |  |
| `required` | `readonly required?: boolean \| undefined;` | optional |  |
| `disabled` | `readonly disabled?: boolean \| undefined;` | optional |  |
| `readOnly` | `readonly readOnly?: boolean \| undefined;` | optional |  |
| `localeText` | `readonly localeText?: SignaturePadLocaleText \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `dir` | `readonly dir?: 'ltr' \| 'rtl' \| 'auto' \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `classNames` | `readonly classNames?: {     readonly label?: string;     readonly surface?: string;     readonly canvas?: string;     readonly toolbar?: string;     readonly description?: string;     readonly error?: string; } \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<SignaturePadApi> \| undefined;` | optional |  |
