• Public
  • Public/Protected
  • All

Interface FormProps

The input structure for creating a new form, either by directly rendering it as component in Ink, or by invoking openForm(form) with it. You have to supply a form attribute to define the structure of the form. You should also supply a onSubmit attribute to receive the results when the user submits the form.

The form is uncontrolled by default, you can specify an initial value with initialValue. You can also switch to controlled mode by explicitly setting a value and reacting to onChange events.


  • FormProps



Optional customManagers

customManagers: undefined | FormFieldManager<FormField>[]

You can use custom field implementations, by specifying their type attribute to a custom value and supplying a FormFieldManager here that can handle this type.


Structure of the form, i.e. which fields are contained in which sections.

Optional initialValue

initialValue: undefined | object

Optional onChange

onChange: undefined | ((value: object) => void)

Optional onSubmit

onSubmit: undefined | ((value: object) => void)

onSubmit is triggered when the user has completed all required fields and triggers the submit button at the end of the page.


the final value of the form.

Optional value

value: undefined | object

Current value of the form. Omit to leave the component in uncontrolled mode.

Generated using TypeDoc