Text Area
A browser native text area input with optional icons and auto resizable input height according to content length.
Supports Universal Input API, with text
format
,parse
,normalize
and event action handlers.
Props
Prop | Type | Default | Description |
---|---|---|---|
compact | Boolean |Number | Whether to use minimal width that fits content, pass a number for additional character offset | |
defaultValue | Any | Initial value for uncontrolled state | |
value | Any | Internal value for controlled state | |
onChange | Function | Handler(event, value: any, name?: string, self) on textarea value changes | |
onFocus | Function | Handler(event, value: any, name?: string, self) on textarea focus | |
onBlur | Function | Handler(event, value: any, name?: string, self) on textarea blur | |
onRemove | Function | Handler(event, value: any, name?: string, self) on textarea removal.
| |
label | String |Number |Boolean |Function | Label to show before the textarea (or after with | |
loading | Boolean | Whether textarea is loading | |
format | Function | Function(value, name?, event?, self) => string - value formatter for UI display | |
parse | Function | Function(value, name?, event, self) => any - Parser for internal value for onChange | |
resize | Boolean | Whether to automatically resize height style to fit content | |
noSpellCheck | Boolean | Whether to disable spell check and autocorrection | |
childBefore | String |Number |Boolean |Function | Custom UI to render before textarea node (inside .textarea wrapper with focus state) | |
childAfter | String |Number |Boolean |Function | Custom UI to render after textarea node (inside .textarea wrapper with focus state) | |
icon | String |Object | Custom Icon name or props to render before textarea node | |
iconEnd | String |Object | Custom Icon name or props to render after textarea node (if |
Examples
Basic Usage
Input Customisation
Input Sizes
Input States
Input Values
Event Handlers
To add validation error message or tooltip, use Universal TextArea Input.