Use the maxlength attribute to achieve that effect. Solution. ", Maximum length and number of lines example. Below is a simple example of this. Create a textarea with a maximum number of characters per line and a maximum number of lines: First, create a function that takes the text field and a . If no maxlength is specified, or an invalid value is specified, the input or textarea has no maximum length. to helps to improve its accessibility. options. Product Bundles. false; if there are no problems, it returns amis JSON . Now you can access the component and its updated value like this: In the example above, the component is accessed using the name Sharedtextarea. Head to Forms Theming to see shared form theming 1 import React, {Component} . To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Read the form data with new FormData(e.target). If you have your own custom Button React component, consider returning