pattern-library checked

GOV.UK Design System: Textarea component

Documents textarea markup with required label, optional hint, rows, spellcheck, disabled state, value, aria-describedby for hint and error text, and specific error message templates for empty, too short, too long, or disallowed-character states.

Open source

Pattern Decisions This Source Supports

Pattern Supported decision Required contract Claim note
Character count Choose character count when the limit is real, useful to users, and enforceable in the same unit displayed by the interface. The field accepts typing and paste normally; the counter observes length rather than blocking editing prematurely. GOV.UK textarea guidance separates the underlying multiline field from count and validation text attached to it.
Textarea Choose textarea when the expected response is more than a short single-line answer. Typing, selection, line breaks, paste, undo, redo, and spellcheck follow native textarea behavior. GOV.UK textarea guidance supports labels, hints, rows, spellcheck, disabled state, aria-describedby, and specific empty or length errors.
Validation that clears user input Flag this anti-pattern when validation failure, failed submit, server rejection, formatting, retry, reload, or route return clears safe user-entered values. Validation messages name the problem and leave the user's value in place for editing. GOV.UK textarea guidance supports value, label, hint, error, and length-related validation for multi-line text.

Evidence Role

This source is treated as pattern-library evidence. Use it to validate the decision rules above, not as a visual style reference.

Publisher: GOV.UK Design System. Last checked: .