Text area
A text area lets a user input a longer amount of text than a standard text field. It can include all of the standard validation options supported by the text field component.
| Property | Values | Default value | Required |
|---|---|---|---|
| label | text | - | |
| label position | top / side | top | |
| hide label | yes / no | no | |
| value | text from minValue to maxValue | - | |
| width | yes / no | no | no |
| size | s / m / l / xl | m | |
| necessity indicator | text / icon | icon | |
| is required | yes / no | no | |
| has character count | yes / no | no | |
| show valid icon | yes / no | no | |
| is error | yes / no | no | |
| is disabled | yes / no | no | |
| hide drag icon | yes / no | no | |
| height | yes / no | no | no |
| help text | text | - | |
| error message | text | - | |
| input type | text / url / phone / email / password | text | |
| state | default / hover / focus + hover / focus + not hover / keyboard focus | default |
{
"slug": "text-area",
"$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
"$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/text-area.json",
"title": "Text area",
"description": "A text area lets a user input a longer amount of text than a standard text field. It can include all of the standard validation options supported by the text field component.",
"meta": {
"category": "inputs",
"documentationUrl": "https://spectrum.adobe.com/page/text-area/"
},
"type": "object",
"properties": {
"label": {
"type": "string"
},
"labelPosition": {
"type": "string",
"default": "top",
"enum": [
"top",
"side"
]
},
"hideLabel": {
"type": "boolean",
"default": false
},
"value": {
"type": "string",
"description": "from minValue to maxValue"
},
"width": {
"type": "number"
},
"size": {
"type": "string",
"enum": [
"s",
"m",
"l",
"xl"
],
"default": "m"
},
"necessityIndicator": {
"type": "string",
"enum": [
"text",
"icon"
],
"default": "icon"
},
"isRequired": {
"type": "boolean",
"default": false
},
"hasCharacterCount": {
"type": "boolean",
"default": false
},
"showValidIcon": {
"type": "boolean",
"default": false
},
"isError": {
"type": "boolean",
"default": false
},
"isDisabled": {
"type": "boolean",
"default": false
},
"hideDragIcon": {
"type": "boolean",
"default": false
},
"height": {
"type": "number",
"description": "If undefined, height is dynamic and grows with input text."
},
"helpText": {
"type": "string"
},
"errorMessage": {
"type": "string"
},
"inputType": {
"type": "string",
"enum": [
"text",
"url",
"phone",
"email",
"password"
],
"default": "text"
},
"state": {
"type": "string",
"enum": [
"default",
"hover",
"focus + hover",
"focus + not hover",
"keyboard focus"
],
"default": "default"
}
}
}