# useField

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

Creates a reactive field store for a specific field within a form store.

```ts
const field = useField<TSchema, TFieldPath>(form, config);
```

## Generics

- `TSchema` `extends FormSchema`
- `TFieldPath` `extends RequiredPath`

## Parameters

- `form` `MaybeGetter<FormStore<TSchema>>`
- `config` `MaybeGetter<UseFieldConfig<TSchema, TFieldPath>>`

### Explanation

With `useField` you create a reactive field store for a specific field path within your form. The field store provides reactive access to the field's input value, validation errors, touched state, and more. It also includes a `props` object that you can spread onto an HTML input or textarea element to automatically handle user interactions like focus, blur, and input events.

## Returns

- `field` `FieldStore<TSchema, TFieldPath>`

## Related

The following APIs can be combined with `useField`.

### Primitives

[`createForm`](/solid/api/createForm.md), [`useFieldArray`](/solid/api/useFieldArray.md)

### Components

[`Field`](/solid/api/Field.md), [`FieldArray`](/solid/api/FieldArray.md), [`Form`](/solid/api/Form.md)

### Methods

[`focus`](/methods/api/focus.md), [`getErrors`](/methods/api/getErrors.md), [`getInput`](/methods/api/getInput.md), [`setErrors`](/methods/api/setErrors.md), [`setInput`](/methods/api/setInput.md), [`validate`](/methods/api/validate.md)
