Textarea API

API reference docs for theTextareacomponent. For examples and details on the usage of this component, visit the component demo page.

Props

PropsTypeDescriptionDefault
defaultValue?stringThe initial value of the textarea. This is used when the component is uncontrolled._
value?stringThe controlled value of the textarea. Use this with onChange to create a controlled component._
placeholder?stringPlaceholder text displayed when the textarea is empty._
disabled?booleanWhen true, prevents the user from interacting with the textarea.false
row?numberSpecifies the visible number of lines in the textarea.3
onBlur?(event: FocusEvent<HTMLTextAreaElement>) => voidCallback function that fires when the textarea loses focus._
onChange?(event: ChangeEvent<HTMLTextAreaElement>) => voidCallback function that fires when the textarea's value changes._
onFocus?(event: FocusEvent<HTMLTextAreaElement>) => voidCallback function that fires when the textarea receives focus._
onKeyDown?(event: KeyboardEvent<HTMLTextAreaElement>) => voidCallback function that fires when a key is pressed while the textarea is focused._

Note: Starting from eds-core@1.21.0, the Textarea supports all native HTML <textarea> attributes and event listeners (e.g., onPaste, onCut, aria-*, etc.) out of the box.