# TerminalFieldOptions

Source: /tuil/docs/reference/packages/form/api/terminal-field-options
Locale: en

interface exported by @mwillbanks/tuil-form.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-form`.

```ts
export interface TerminalFieldOptions<T> {
  readonly name: string;
  readonly initialValue: T;
  readonly value?: T;
  readonly onValueChange?: (value: T) => void | Promise<void>;
  readonly validators?: FieldValidators<T>;
  readonly disabled?: boolean;
  readonly readOnly?: boolean;
  readonly secret?: boolean;
}
```

## Members [#members]

| Member          | Type                                                 | Required | Description                                                                                        | Related types                                                           |
| --------------- | ---------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `name`          | `string`                                             | Yes      | The `name` member uses the `string` contract.                                                      | —                                                                       |
| `initialValue`  | `T`                                                  | Yes      | The `initialValue` member uses the `T` contract.                                                   | —                                                                       |
| `value`         | `T \| undefined`                                     | No       | The `value` member uses the `T \| undefined` contract.                                             | —                                                                       |
| `onValueChange` | `((value: T) => void \| Promise<void>) \| undefined` | No       | The `onValueChange` member uses the `((value: T) => void \| Promise<void>) \| undefined` contract. | —                                                                       |
| `validators`    | `FieldValidators<T> \| undefined`                    | No       | The `validators` member uses the `FieldValidators<T> \| undefined` contract.                       | [`FieldValidators`](/tuil/docs/reference/packages/form/api/field-validators) |
| `disabled`      | `boolean \| undefined`                               | No       | The `disabled` member uses the `boolean \| undefined` contract.                                    | —                                                                       |
| `readOnly`      | `boolean \| undefined`                               | No       | The `readOnly` member uses the `boolean \| undefined` contract.                                    | —                                                                       |
| `secret`        | `boolean \| undefined`                               | No       | The `secret` member uses the `boolean \| undefined` contract.                                      | —                                                                       |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`FieldValidators`](/tuil/docs/reference/packages/form/api/field-validators)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/form/src/index.tsx)

## Package [#package]

[@mwillbanks/tuil-form](/tuil/docs/reference/packages/form)
