--- id: field title: Field --- ### `type FieldComponent` A type alias representing a field component for a specific form data type. ```tsx export type FieldComponent = >({ children, ...fieldOptions }: { children: (fieldApi: FieldApi, TFormData>) => any name: TField } & Omit, TFormData>, 'name'>) => any ``` A function component that takes field options and a render function as children and returns a React component. ### `Field` ```tsx export function Field({ children, ...fieldOptions }: { children: (fieldApi: FieldApi) => any } & FieldOptions< TData, TFormData >): any ``` A functional React component that renders a form field. - `children: (fieldApi: FieldApi) => any` - A render function that takes a field API instance and returns a React element. - `fieldOptions: FieldOptions` - The field options. The `Field` component uses the `useField` hook internally to manage the field instance. ### `createFieldComponent` ```tsx export function createFieldComponent( formApi: FormApi, ): FieldComponent ``` A factory function that creates a connected field component for a specific form API instance. - `formApi: FormApi` - The form API instance to connect the field component to.