# FormProps (@salmonui/inputs/form)

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

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

```ts
import type { FormProps } 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 FormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, 'action'> {
    readonly children?: ReactNode;
    readonly ref?: Ref<HTMLFormElement> | undefined;
    readonly action?: string | ((formData: FormData) => void | Promise<void>) | undefined;
    readonly validationBehavior?: ValidationBehavior | undefined;
    readonly validateOn?: ValidateOn | undefined;
    readonly validationErrors?: ValidationErrors | undefined;
    readonly onBeforeValidate?: ((event: FormValidateEvent) => void) | undefined;
    readonly onValidate?: ((result: FormValidationResult) => void) | undefined;
    readonly requiredMark?: boolean | undefined;
}
```

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `children` | `readonly children?: ReactNode;` | optional |  |
| `ref` | `readonly ref?: Ref<HTMLFormElement> \| undefined;` | optional |  |
| `action` | `readonly action?: string \| ((formData: FormData) => void \| Promise<void>) \| undefined;` | optional | A URL or a React 19 action (`useActionState`). |
| `validationBehavior` | `readonly validationBehavior?: ValidationBehavior \| undefined;` | optional | `'native'` (default) blocks an invalid submit and focuses the first invalid field; `'aria'` marks fields and submits. |
| `validateOn` | `readonly validateOn?: ValidateOn \| undefined;` | optional | Default `validateOn` of the fields inside. Default `'blur'`. |
| `validationErrors` | `readonly validationErrors?: ValidationErrors \| undefined;` | optional | Server errors keyed by field `name`, shown until the field's value changes. |
| `onBeforeValidate` | `readonly onBeforeValidate?: ((event: FormValidateEvent) => void) \| undefined;` | optional |  |
| `onValidate` | `readonly onValidate?: ((result: FormValidationResult) => void) \| undefined;` | optional |  |
| `requiredMark` | `readonly requiredMark?: boolean \| undefined;` | optional | Marks the label of every required field inside with a decorative asterisk (`@salmonui/inputs/form/styles.css`); the requirement itself is announced from `required` / `aria-required`. A `Field` opts out with `requiredMark={false}`. |
