Textarea component
The Textarea component implements the <textarea> form field.
Options
| Option | Description | Type | Default | 
|---|---|---|---|
| cols | The number of columns that will be specified in the  colsattribute of the textarea DOM element. | Number | 15 | 
| component | The path to the component’s  .jsfile in terms of RequireJS. | String | 'Magento_Ui/js/form/element/textarea' | 
| elementTmpl | The path to the  .htmltemplate of the particular type of field (textarea). | String | 'ui/form/element/textarea' | 
| label | Label to be displayed in the field. | String | '' | 
| rows | The number of rows that will be specified in the  rowsattribute of the textarea DOM element. | Number | 2 | 
| template | The path to the general field  .htmltemplate. | String | 'ui/form/field' | 
Source files
Extends Abstract:
- app/code/Magento/Ui/view/base/web/js/form/element/textarea.js
- app/code/Magento/Ui/view/base/web/templates/form/element/textarea.html
- app/code/Magento/Ui/view/base/web/templates/form/field.html
Examples
Integration
This example integrates the Textarea component with the Form component.
Copied to your clipboard<form>...<fieldset>...<field name="textarea_example"><argument name="data" xsi:type="array"><item name="config" xsi:type="array"><item name="formElement" xsi:type="string">textarea</item><item name="cols" xsi:type="number">15</item><item name="rows" xsi:type="number">5</item><item name="label" translate="true" xsi:type="string">Textarea Field Example</item><item name="dataType" translate="true" xsi:type="string">text</item></item></argument></field></fieldset></form>
Result
      
  