Form

Gather all your input fields in one place, like a survey collecting data, making it easy to organize and submit info.

Basic

A form is a collection of inputs that allows users to submit data to a server, with built-in field error validation.

import { Form } from 'ui'
 
<Form/>

Installation

If you hit any issues, make sure you check out the installation guide here.

Manual Installation

Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.

All these components are tight, so you gotta use 'em all together.

Validation

You can validate the form using the isRequired prop.

Sometimes, server-side errors don't match the client-side validation. You can handle this by using the validationErrors prop to format them correctly.

<Form validationErrors={errors} onSubmit={() => {}}/>

Then, in the <TextField /> component, pass the errorMessage prop like this:

<TextField errorMessage={errors.name} label="Name" isRequired/>