# MaskedFieldProps (@salmonui/inputs/masked-field)

> The MaskedFieldProps interface of @salmonui/inputs/masked-field.

Canonical: https://salmonui.dev/docs/reference/inputs/masked-field/MaskedFieldProps

```ts
import type { MaskedFieldProps } from '@salmonui/inputs/masked-field';
```

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

## Reference

Kind: interface

```ts
interface MaskedFieldProps extends FieldCommonProps, NativeInput {
    readonly mask: string;
    readonly tokens?: MaskTokens | undefined;
    readonly placeholderChar?: string | undefined;
    readonly placeholder?: string | undefined;
    readonly value?: string | undefined;
    readonly defaultValue?: string | undefined;
    readonly onValueChange?: ((value: string, details: MaskedChangeDetails) => void) | undefined;
    readonly submitValue?: 'raw' | 'masked' | undefined;
    readonly clearable?: boolean | undefined;
    readonly startAdornment?: ReactNode;
    readonly endAdornment?: ReactNode;
    readonly localeText?: MaskedFieldLocaleText | 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 (23):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `label` | `label?: ReactNode;` | optional, inherited |  |
| `description` | `description?: ReactNode;` | optional, inherited |  |
| `mask` | `readonly mask: string;` |  | The mask; an empty mask is plain text. |
| `tokens` | `readonly tokens?: MaskTokens \| undefined;` | optional | Custom mask characters: allowed characters or a RegExp per character. |
| `placeholderChar` | `readonly placeholderChar?: string \| undefined;` | optional | Shown in empty positions. Default `'_'`. |
| `placeholder` | `readonly placeholder?: string \| undefined;` | optional | Shown while the field is empty and not focused. |
| `value` | `readonly value?: string \| undefined;` | optional | Raw value: entered characters without literals or placeholders. |
| `defaultValue` | `readonly defaultValue?: string \| undefined;` | optional |  |
| `onValueChange` | `readonly onValueChange?: ((value: string, details: MaskedChangeDetails) => void) \| undefined;` | optional |  |
| `submitValue` | `readonly submitValue?: 'raw' \| 'masked' \| undefined;` | optional | What the hidden named input submits. Default `'raw'`. |
| `clearable` | `readonly clearable?: boolean \| undefined;` | optional |  |
| `startAdornment` | `readonly startAdornment?: ReactNode;` | optional |  |
| `endAdornment` | `readonly endAdornment?: ReactNode;` | optional |  |
| `localeText` | `readonly localeText?: MaskedFieldLocaleText \| 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 visible native `<input>`. |
| `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'`. |
