Forms are used to allow the user to submit information to our app. The form component provides a very simple, yet powerful way how to handle forms.

We are using uncontrolled components to handle forms. The native onSubmit Event gets intercepted and all values are collected and get pass them as second argument to your onSubmit callback.

Note: You don't need to use the From component in order to make the components like TextInput work. You can also use them standalone. To learn more, check out controlled components section in the React docs.

Getting started with 'Form'

The Form components just does one simple thing: It intercepts the onSubmit Event and collects all data that the user entered and passes it as second parameter to the onSubmit callback, so you can work with it.

Simple example

HTML5 Form validation

To validate user input, we rely on HTML5 Form validation. It provides a standardized and powerful way to validate users input and is supported across all modern browsers. If you did not use it yet, make sure the read the documentation on Also see the TextInput for allowed props.

Full Example


Create new account