TextArea

The TextArea component is layout-independent, that means it only includes the most basic TextArea box part. If you want to add borders, titles, or some operation buttons with it, you can combine with the List or Form components.

In addition, the following native attributes are supported: autoComplete autoFocus disabled readOnly onFocus onBlur onCompositionStart onCompositionEnd onClick.

<TextArea placeholder="please input content" />

Example

Basic usage of TextArea component.

API

PropertiesDescriptionTypeDefault
idThe id of the TextArea element, usually used with labelstring-
valueThe input valuestring-
defaultValueThe default valuestring-
placeholderThe hint textstring-
disabledWhether it is disabled or notbooleanfalse
readOnlyWhether it is readonly or notbooleanfalse
onChangeTriggered when the TextArea content is changed(value: string) => void-
autoSizeAdaptive content heightboolean | { minRows?: number, maxRows?: number }false
rowsThe number of rowsnumber2
maxLengthThe maximum number of charactersnumber-
showCountDisplays the number of words, supports custom render countboolean | ((length: number, maxLength?: number) => ReactNode)false
ON THIS PAGE