Text-area
Usage
A multiple line, free-form entry input component allowing users to type or edit medium to large amount of information, such as comments and descriptions.
Behaviour
When the component is active the user should be able to enter/ edit information. Typing text is accesible through a physical or virtual keyboard. As the text overflows the box limits, it continues in the next row.
JSON structure example
"viewDefinition": {
"children": {
"textareaComponent": {
"type": "textarea",
"id": "textareaId",
"ariaLabel": "Textarea",
"description": "Textarea description",
"disabled": false,
"inlineLabel": false,
"label": "Textarea",
"maxLength": "20",
"name": "textarea",
"placeholder": "Please enter text",
"readOnly": false,
"required": false,
"rows": "7",
"showCount": true,
"showFullDescription": false,
"value": "Text value",
"width": "m"
}
}
}
id
(String) - an id for the componentariaLabel
(String) - used to define a string that labels the text inputdescription
(String) - a text describing the purpose or value of the textareadisabled
(Boolean) - set to true in order to disable the text input- Default:
false
- Default:
inlineLabel
(Boolean) - display label in same line as input- Default:
false
- Default:
label
(String) - a label for the textareamaxLength
(String) - specifies the maximum number of characters allowed in the textareaname
(String) - name of the form control. Submitted with the form as part of a name/value pairplaceholder
(String) - text that appears in the form control when it has no value setreadOnly
(Boolean) - if true the value will not be editable- Default:
false
- Default:
required
(Boolean) - set to true to set the field as required- Default:
false
rows
(String) - the number of text rows in the textareashowCount
(Boolean) - set to true to display a words counter next to the form control- Default:
false
- Default:
value
(String) - value initially selected. By default it will have no selected value at allwidth
(String) (Optional) - defines the height of the text input, choose from:- Allowed values: {
fit
,l
,m
,s
,xs
} - Default:
fit
Do's and Don'ts
For more details, refer to Textarea Usage and Visual styleguides in our Storybook