TextArea (System API)
The TextArea component supports multi-line text input.
NOTE
This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
This topic describes only system APIs provided by the module. For details about its public APIs, see TextArea.
voiceButton23+
voiceButton(options: Optional<VoiceButtonOptions>)
Sets the voice button options.
System API: This is a system API.
System capability: SystemCapability.ArkUI.ArkUI.Full
Atomic service API: This API can be used in atomic services since API version 23.
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| options | Optional<VoiceButtonOptions> | Yes | Voice button options. |
Examples
Example 1: Setting a Voice Button
This example demonstrates how to enable the voice input button for an input box by configuring the voiceButton API.
The voiceButton API is added since API version 23.
// xxx.ets
@Entry
@Component
struct TextAreaExample {
build() {
Column() {
TextArea().voiceButton({enabled: true})
}
}
}