Inputs allow for users to enter and edit information, typically in a Form. A variety of inputs are available to control the formatting of the incoming information.
The URL input type will accept all characters entered but uses built-in validation for URLs. If an invalid URL is entered, an error will be displayed when the user submits the Form.
If the Input field is required, you should pass the required prop. This will prevent any Form submission until the required Input is complete.
You may wish to disable an Input field in order to prevent a user from entering or editing any information while some task is being completed, or to restrict a user's access.
If you want to render information that has already been entered for viewing purposes only, use the readOnly prop. The user will not be able to edit the Input if it is read only.
Sometimes you may want to add some styling to an Input field given the outcome of certain user actions. The color schemes for the following statuses can be controlled via
components['form-field'] in the Theme. In Cosmos, a success status isn’t typically presented to the user because it is possible that the field will pass client-side validation but may fail when checking against server-side validation.