Textarea

A multi-line text input component that automatically adjusts its height based on content. Ideal for comments, descriptions, and longer text entries.

Overview

size
medium · small · tiny
Toggles
autoFocus, disabled, error

All options

Size and state

Available in medium (default), small and tiny sizes.

size \ stateenablederrordisabled
medium

Keep it under 200 characters

small

Keep it under 200 characters

tiny

Keep it under 200 characters

Label

Examples

Submit on Ctrl/Cmd+Enter

Use the onSubmit prop to handle submission when the user presses Ctrl+Enter (or Cmd+Enter on Mac).

Accessibility

Label

When label is set it renders a <label> tied to the textarea by id.

Error message

With error set, the textarea gets aria-invalid and aria-describedby pointing at the errorText message.

Props

PropTypeRequiredDescription
idstringYes—
labelstringNo—
valuestringYes—
onChange(e: React.ChangeEvent<HTMLTextAreaElement>) => voidYes—
onBlur(e: React.FocusEvent<HTMLTextAreaElement>) => voidNo—
onFocus(e: React.FocusEvent<HTMLTextAreaElement>) => voidNo—
onKeyDown(e: React.KeyboardEvent<HTMLTextAreaElement>) => voidNo—
onCompositionStart(e: React.CompositionEvent<HTMLTextAreaElement>) => voidNo—
onCompositionEnd(e: React.CompositionEvent<HTMLTextAreaElement>) => voidNo—
onSubmit() => voidNo—
autoFocusbooleanNo—
maxRowsnumberNo—
disabledbooleanNo—
errorbooleanNo—
errorTextstringNoMessage shown under the field when `error` is true
size'medium' | 'small' | 'tiny'No—
placeholderstringNo—
namestringNo—
autoCompletestringNoBrowser autofill hint. Defaults to "off".
tabIndexnumberNo—