Homecomponentsinput

Textarea

A field to get multiple lines of plain text.


The Textarea component allows you to create multi-line text inputs.

Size

Use size property to set the size of the input.

Label

Use label property to set the label for input.

Message

Label tip

Use tip property to add a tooltip next to label.

Message

Secondary Label

Use secondaryLabel to add a seconday label.

Message
0/30

Placeholder

Use placeholder property to add a placeholder to the input.

Message

Description

Use description property to add a note below the input.

Please write at least several sentences.

Disabled

Use disabled property to disable the input.

Message

Error

Use errorMessage property to add an error message below the input.

Message
Message should contain at least 30 characters

Lines

Use lines property (5 in this example) to set the number or rows in the input.

Message

Maximum Lines (Auto-height)

Use maxLines property to indicate the maximum lines it should grow to automatically.

Message

Character Limit

Use characterLimit (20 in this example) to set the limit max number of characters.

Message

API

name
Required
Name for the field.
string

placeholder
Placeholder of the input.
string

disabled
Prevents the user from interacting with the input.
true
false

size
Size of the input.
small
regular

value
Value for the input.
string

onChange
Called when the input's value is changed by the user.
((value: string) => void)

onBlur
Action to perform when the field is blurred.
FocusEventHandler<HTMLTextAreaElement>

required
Indicates that the input is mandatory.
true
false

autoComplete
Indicates whether the value of the input can be automatically completed by the browser.
true
false

autoFocus
Specifies that the input should have focus when the page loads.
true
false

lines
The number of visible text lines for the input.
number

maxLines
The number of maximum visible text lines for the input.
number

characterLimit
The maximum number of characters that the user can enter.
number

resize
Allow resize of the input.
none
horizontal
vertical
both

id
ID of the field.
string

label
Adds a label to the field.
string

tip
Tooltip shown next to the label.
string

secondaryLabel
Adds a secondary label to the field.
ReactNode

description
Note shown below the field.
string

errorMessage
Displays an error message under the field.
string

data
An object with the data keys and values.
DataAttributeMap

ref
Ref<HTMLTextAreaElement>

key
Key | null