Textarea
Edit multi-line text with optional auto-sizing and Field integration.
Use Textarea for multi-line native text entry. Use InputGroup to put controls around it without changing which element receives typing and focus.
Basic usage#
Playground#
Props
Slots
Anatomy#
Usage#
Native text behavior#
Textarea forwards native textarea attributes and works with controlled or uncontrolled values. Use readOnly to preserve selection and focus without edits, or disabled to prevent interaction.
Size and composition#
Enable autoresize and constrain it with rows and maxRows. Use InputGroup orientation="vertical" with Leading and Trailing for header and footer regions. Counters, submit buttons, and keyboard shortcuts remain application-owned behavior.
Examples#
Autoresize#
Header and footer#
Character count#
Form integration#
Attributes#
Attributes
data-autoresizeSlot: textareaDescription: Present when the text control grows with its content.data-disabledSlot: textareaDescription: Present when the component, slot, or item is disabled.data-invalidSlot: textareaDescription: Present when the field or form has a validation error.data-readonlySlot: textareaDescription: Present when the field is in read-only mode.data-requiredSlot: textareaDescription: Present when the field input is required.Props#
Props for the Textarea component. Renders a <textarea> element by default.
Prop