Textarea

Retrieve multi-line user input.

Default

Disabled

Error

Best Practices

  • Pick <Textarea> for content that wraps to multiple lines (commit messages, descriptions, notes); use Input for a single value like a name or domain.
  • Set a generous default rows and grow only when the surface has vertical room; don’t let the field push primary actions below the fold.
  • Validate on blur and pass a string to error to render the inline message; the validation replaces helper text on failure.
  • Trim leading and trailing whitespace on submit so empty newlines don’t pass a required check.
  • Labels are short Title Case nouns (Description, Release Notes); placeholders show an example value, not instructions like Enter a description.
  • Validation names the field and constraint, ends in a period, and skips please (Description is required., Release notes can’t exceed 500 characters.).
  • Render helper text as a sibling <p> linked through aria-describedby; sentence case, one sentence, with a period.