pattern-library checked
GOV.UK Design System: Text input component
Documents single-line text input markup with required label, optional hint, error message, aria-describedby wiring, autocomplete attributes for input purpose, and prefix or suffix options.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Text input | Choose text input when the user enters a short freeform value such as a reference, title, identifier, one-line note, or organization name. | Typing, deleting, selection, undo, and paste operate like a native single-line text field. | GOV.UK text input guidance supports persistent labels, hints, error messages, aria-describedby wiring, autocomplete attributes, and input width variants. |
| 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 text input guidance supports value, label, hint, error, and described-by wiring for preserving and correcting field input. |
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: .