Textarea
Multi-line input. Use Input for a single value like a name or domain.
Default
Native attrs (placeholder, rows, readonly) pass through to the textarea.
Sizes
small is 13px. default and medium share the 14px style. large is 16px.
Disabled
Error
Pass a string to error. The message is wired with aria-invalid and aria-describedby.
Read only
readonly is a native attr. The field stays copyable and skips the disabled wash.
Rows
Set rows when the surface has a fixed vertical budget. resize-y is already on the field.
Best practices
- Multi-line content only: commit messages, descriptions, notes. A name, domain, or token is
Input. - Pick a generous default
rows. Do not let the field push the primary action below the fold. - Validate on blur. Pass the failure string to
errorso the inline message replaces helper text. - Trim leading and trailing whitespace on submit so empty newlines do not pass
required. - Labels are short Title Case nouns (
Description,Release Notes). Placeholders show an example, not "Enter a description". - Error copy names the field and the constraint, ends with a period, and skips "please":
Description is required.. mediumis a size alias ofdefault. New code should usesmall,default, orlarge.- Always give the control an accessible name: a visible label or
aria-label.