TextArea
import { TextArea } from '@concur/nui-widgets';Text area form controls are used to gather potentially lengthy input from a user. Best practice is to use this component as a child of FormGroup.
Example
Three sizes are supported: 'lg' (the default), 'md' and 'sm'. Use the size property to set the size.
Usage
Properties
| Property | Type | Default | Description |
|---|---|---|---|
className | String | Any custom classes to add to the <textarea> componentClass element. | |
id | String | Sets the id attribute on the <textarea> componentClass element. If used within a FormGroup, the controlId property will be used. This property overrides that. | |
inputRef | Function | Attaches a ref to the <input> element. | |
isResizableX | Boolean | false | Sets if the textarea can be resized by the user horizontally |
isResizableY | Boolean | true | Sets if the textarea can be resized by the user vertically |
required | Boolean | false | Adds the required attribute to the <textarea> element. NOTE: This does not perform any validation, but rather just marks the field as required. |
size | String | 'lg' | Size of the <input> element. Options are 'lg', 'md', 'sm'. |
validationMessageState | String | If used in conjunction with field validation, this provides the icon next to the label. Options are 'error', 'warning'. |
Callbacks
| Property | Parameters | Description |
|---|---|---|
onBlur | event | Callback function for onBlur events. |
onFocus | event | Callback function for onFocus events. |