# FieldProps (@salmonui/inputs/form)

> The FieldProps interface of @salmonui/inputs/form.

Canonical: https://salmonui.dev/docs/reference/inputs/form/FieldProps

```ts
import type { FieldProps } from '@salmonui/inputs/form';
```

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

## Reference

Kind: interface

```ts
interface FieldProps extends FieldCommonProps {
    readonly children: (field: FieldRenderProps) => ReactNode;
    readonly name?: string | undefined;
    readonly errorPlacement?: 'auto' | 'manual' | undefined;
    readonly id?: string | undefined;
    readonly value?: unknown;
    readonly required?: boolean | undefined;
    readonly requiredMark?: boolean | undefined;
    readonly disabled?: boolean | undefined;
    readonly localeText?: FieldValidationText | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
}
```

Members (18):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `children` | `readonly children: (field: FieldRenderProps) => ReactNode;` |  |  |
| `name` | `readonly name?: string \| undefined;` | optional |  |
| `errorPlacement` | `readonly errorPlacement?: 'auto' \| 'manual' \| undefined;` | optional | `'manual'` when the children render `FieldError` themselves. Default `'auto'`. |
| `id` | `readonly id?: string \| undefined;` | optional | Id of the control (default from `useId`); the label points at it. |
| `value` | `readonly value?: unknown;` | optional | The control's current value, for `validation` rules. |
| `required` | `readonly required?: boolean \| undefined;` | optional |  |
| `requiredMark` | `readonly requiredMark?: boolean \| undefined;` | optional | `true` marks the label while the control is required (as `Form requiredMark` does); `false` opts out under a marking `Form`. |
| `disabled` | `readonly disabled?: boolean \| undefined;` | optional |  |
| `localeText` | `readonly localeText?: FieldValidationText \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `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'`. |
