Text area

Multi-line input




Name Type Content
textarea Native element Text


Name Value Description
rows Number Sets a starting height that will accommodate the given number of rows, i.e. lines of text. This does not prevent additional lines from being typed and the user can also resize it to be taller or shorter.
maxlength Number Limits the number of characters allowed in the text area.
minlength Number Sets a minimum required number of characters in the text area.
Note: Not all text area attributes are listed here. See MDN: Text area element - Attributes for the full list.


Sensible row size

The default is three rows, i.e. three lines of text, but you should set a number that makes the most sense for your use case. For example, a chat app makes sense to take the default of three, but a customer feedback form should likely have 5-10. Note that text areas are resizable so the user can extend it further if needed, just take care to set a sensible default.


There are no accessibility recommendations for text area.