Skip to content

Textarea ​

Textarea is the input of text of several lines.

When to use ​

Use it for a description, a comment or a note; one line of text is a TextInput. rows sets the least number of lines and maxRows the most it grows to; beyond them the text scrolls inside. The keys (send with Enter, cancel with Escape) are the application's, through onkeydown.

Props ​

PropDefaultDescription
value''The text (bindable)
placeholderShown while it is empty
rows2The least number of lines
maxRowsThe most lines it grows to
ariaLabelThe accessible name without a Field
idThe id of the textarea
errorfalseThe line turns red
disabledfalseCannot be focused or changed
onchange, onblurThe committed value, and the loss of focus
onkeydownThe keys
elThe textarea element (bindable)

Contract ​

It is the control of a TextInput, whose height grows with the text. The lines take the running line height of body, and the padding above and below makes one line as high as a TextInput, with the text in the same place. Focus shows once, on the control's line; an error turns it red-ink.

Example ​

Textarea

Released under the Apache-2.0 license.