# Field

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

Headless form field component that provides reactive properties and state. The field component takes a form store, path to field, and a snippet that receives a field store to display field state and handle user interactions.

```svelte
<Field of={…} path={…}>children</Field>
```

## Generics

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

## Properties

- `of` `FormStore<TSchema>`
- `path` `ValidPath<v.InferInput<TSchema>, TFieldPath>`
- `children` `Snippet<[FieldStore<TSchema, TFieldPath>]>`

### Explanation

The `Field` component is a headless component that doesn't render any UI itself. Instead, it accepts a `children` snippet and invokes it with a [`FieldStore`](/svelte/api/FieldStore.md) containing all the reactive state and props needed to render a form field.

The component automatically handles field registration, validation, and state management through the `of` prop that references the form store.

## Related

### Runes

[`createForm`](/svelte/api/createForm.md), [`useField`](/svelte/api/useField.md)

### Components

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