Skip to content

Text Area Input

The Text Area Input component is a multi-line form control that allows users to enter and edit longer blocks of text.

  • Collect free-form, multi-line text input such as comments, descriptions, messages, or notes.
  • When input may exceed a single line and users benefit from visible line breaks and resizing.
  • In forms requiring detailed responses or formatted plain text.
  • With label and description: Position label above and optional helper text below.
  • Character counter: Display remaining or used characters for length-limited fields.
  • Auto-resize: Height expands dynamically based on content.
  • Validation feedback: Error state with message for invalid or required input.
  • For single-line text; use Text Field instead.
  • For rich text with formatting; use a dedicated rich text editor.
  • When input is strictly limited to short values; prefer Text Field or Select.
  • For code or pre-formatted text; consider specialized components.
ElementDescription
LabelText describing the purpose of the input.
Text AreaResizable <textarea> field for multi-line entry.
PlaceholderOptional hint text shown when empty.
DescriptionOptional helper text below the field.
Error MessageValidation error text displayed in error state.
Character CounterOptional display of current/max length.
StateDescriptionVisual Indicators
DefaultDefault interactive stateNeutral border and text
HoverCursor over objectSubtle border or background change
FocusKeyboard focus (visible on Tab or arrow key navigation) or on clickHigh-contrast focus ring
DisabledNon-interactiveGrayed out
InvalidValidation errorRed border, error icon/message
  • Use clear, concise labels (e.g., “Description”, “Comments”).
  • Placeholder: Provide supplemental context example or guidance (e.g., “Enter your feedback here”).
  • Error messages: Specific and actionable (e.g., “Please enter a description”).
  • Character limits: Mention in description or counter if applicable.
  • Use native <textarea> with aria-labelledby for label association.
  • Support aria-required, aria-invalid, and aria-errormessage.
  • Provide aria-describedby for description or counter.
  • Ensure resizable handle is keyboard accessible if present.
  • For dynamic character counters, announce changes using aria-live="polite" on the counter element.

Support standard keyboard navigation

  • Tab: Focus the text area.
  • Typing: Standard text entry with line breaks via Enter.
  • Arrow keys: Navigate within text.
  • Shift+Enter: Optional line break without submission (if in form).