‮Skip to content‬
uiify

Textarea

‮Multi-line text field that grows with its content.‬

‮Browsers‬
Chrome 123+Firefox 152+
‮Why this version?‬

The auto-sized textarea uses CSS field-sizing: content. Older Firefox versions keep the textarea at its fixed size as text is entered.

Safari 26.2+
‮Why this version?‬

The auto-sized textarea uses CSS field-sizing: content. Older Safari versions keep the textarea at its fixed size as text is entered.

‮Tier‬
0
‮Bundle compressed‬
348 B
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Published contract‬
‮Test harness‬

‮Playground‬

Textarea

‮Default‬

Autosize

‮API‬

Textarea

‮Prop‬‮Type‬‮Default‬‮Description‬
valuestring—‮Current value, making the textarea controlled.‬
defaultValuestring—‮Starting value for the uncontrolled textarea, which the native element then owns.‬
onValueChange(value: string) => void—‮Called with the new value whenever the textarea changes.‬
autoSizebooleanfalse‮Grows the textarea with its content using CSS field-sizing, with no JavaScript involved.‬
disabledbooleanfalse‮Disables the native textarea and sets the data-disabled attribute.‬
readOnlybooleanfalse‮Makes the value read-only while keeping the textarea focusable.‬
invalidbooleanfalse‮Marks the textarea invalid via aria-invalid and the data-invalid attribute.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

‮Keyboard‬

‮Key‬‮Action‬
Tab‮Move focus to/from the control‬
Enter / Space‮Activate when focused (button-like controls)‬

‮Accessibility‬

‮Uses semantic HTML where possible. Inspect rendered markup in the playground — ARIA is added only when native elements are insufficient.‬

‮Styling hooks‬

data-disabled