Multi-line input box

Updated at:

Introduction

A multi-line input box is a common form component that allows users to enter multiple lines of content.

image

Configuration items

Category

Configuration

Example

Description

Content

Default value

The default value of the component.

Placeholder content

The placeholder content.

Maximum length

The maximum number of characters that can be entered.

Label

The form label. For more information, see Common form properties.

Interaction

Hidden

Hides the component. For more information, see Common properties.

Disabled

Disables the component. A disabled component cannot be clicked or selected.

Validation

Form validation. For more information, see Common form properties.

Style

Margin

The outer margin. For more information, see Common properties.

Clear button

Specifies whether to display the clear button.

Auto wrap

If auto wrap is enabled, you can set the maximum and minimum number of lines.

Number of lines

If auto wrap is disabled, you can set a fixed number of lines.

CSS style

Border radius

The border radius.

Font size

The font size.

Text color

The text color.

Label font size

The font size of the label.

Properties and methods

Name

Type

Example

Description

value

string

textArea.value

The content of the component.

labelText

string

textArea.labelText

The label text of the component.

disabled

boolean

textArea.disabled

Specifies whether the component is disabled.

maxLength

number

textArea.maxLength

The maximum length of the component.

maxHeight

number

textArea.maxHeight

The maximum number of lines for the component.

minHeight

number

textArea.minHeight

The minimum number of lines for the component.

placeholder

string

textArea.placeholder

The placeholder content for the component.

hidden

boolean

textArea.hidden

Specifies whether the component is hidden.

validationStatus

boolean

textArea.validationStatus

The validation status of the component after validation.

validationMessage

string

textArea.validationMessage

The validation message of the component after validation.

blur

func

textArea.blur()

Makes the component lose focus.

focus

func

textArea.focus()

Makes the component gain focus.

validate

func

textArea.validate()

Validates the component.

setValue

func

textArea.setValue('')

Sets the content of the component.

setDisabled

func

textArea.setDisabled(true)

Sets the disabled state of the component.

setHidden

func

textArea.setHidden(true)

Sets the hidden state of the component.

clearValue

func

textArea.clearValue()

Clears the value of the component.

clearHidden

func

textArea.clearHidden()

Clears the hidden state of the component.

clearValidate

func

textArea.clearValidate()

Clears the validation information for the component.

Event callbacks

Configuration

Description

Triggered when the value of the component changes.

Triggered when the component gains focus.

Triggered when the component loses focus.

Triggered when the Enter key is pressed inside the component.