TextArea
<ui5-ai-textarea> | Since 2.16.0The @ui5/webcomponents-ai package is under development and considered experimental - components' APIs are subject to change. Furthermore, the package supports Horizon themes only.
The ui5-ai-textarea component extends the standard TextArea with Writing Assistant capabilities.
It provides AI-powered text generation, editing suggestions, and version management functionality.
Structure
The ui5-ai-textarea consists of the following elements:
- TextArea: The main text input area with all standard textarea functionality
- WritingAssistant: Dedicated toolbar containing:
- Versioning: A component with left/right navigation buttons and a label for browsing AI-generated versions
- AI Button: Opens a menu that can be extended with custom AI generation options through slotting
ES6 Module Import
import "@ui5/webcomponents-ai/dist/TextArea.js";
Basic Sample
Properties
currentVersion
loading
promptDescription
totalVersions
accessibleDescription
accessibleDescriptionRef
accessibleName
accessibleNameRef
disabled
growing
growingMaxRows
maxlength
name
placeholder
readonly
required
rows
showExceededText
value
valueState
Slots
menu
valueStateMessage
Events
stop-generation
version-change
change
input
scroll
select
Methods
No methods available for this component.
CSS Parts
For more information on how to use CSS shadow parts, see Usage of CSS Shadow Parts.
CSS Custom States
No CSS custom states available for this component.
Extended Sample
This extended sample showcases advanced AI TextArea features including multiple AI actions and version management.