# FieldElementProps

> This document is the Markdown version of [formisch.dev/solid/api/FieldElementProps/](https://formisch.dev/solid/api/FieldElementProps/). For the complete documentation index, see [llms.txt](https://formisch.dev/llms.txt).

Props to spread onto a field element for integration with SolidJS form handling.

## Definition

- `FieldElementProps`
  - `name` `string`
  - `autofocus` `boolean`
  - `ref` `(element: FieldElement) => void`
  - `onFocus` `() => void`
  - `onInput` `EventHandler<FieldElement, InputEvent>`
  - `onChange` `EventHandler<FieldElement, Event>`
  - `onBlur` `() => void`

### Explanation

`onFocus` marks the field as touched and runs the configured `'touch'` validation, while `onBlur` runs the configured `'blur'` validation. Neither handler uses the event object, so both are typed as `() => void` and can be passed to native elements or custom components with different focus event types.
