GOV.UK Design System Password input
Documents a password input with type password, current-password autocomplete, show and hide toggle labels and announcements, error messages, default hidden state, no confirm field, paste support, spellcheck disabled, autocapitalization disabled, and guidance for incorrect login attempts.
What this source can teach
Use this source to compare a documented solution with the task and states in your own product.
- Start with the original. Open the source and find the guidance or example relevant to your task.
- Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
- Check the setting. Compare the source's platform, people, and constraints with your own decision.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Password input | Choose password input when the value is a password, passphrase, PIN-like memorized secret, current password, reauthentication secret, or credential confirmation value. | Typing, paste, selection, deletion, undo, and password-manager autofill work through native input behavior. | GOV.UK supports password type, show and hide controls, current-password autocomplete, paste support, failed-login clearing, combined account-detail errors, no confirm field, spellcheck disabled, and autocapitalization disabled. |
| 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 password guidance supports the boundary case where failed login clears a password while preserving non-secret context. |
Comparisons supported by this source
- Password input vs text input vs inline validation vs error summary
GOV.UK supports type password, show and hide controls, current-password autocomplete, paste support, spellcheck and autocapitalization controls, no confirm field, and combined account-details errors.
- Validation that clears user input vs inline validation vs error summary vs single-page form vs autosave recovery vs error state
GOV.UK password input guidance defines the sensitive-field boundary where password clearing can be appropriate.
Evidence Role
This source is treated as pattern-library evidence. Its value comes from the specific claims and setting described above.
Publisher: GOV.UK Design System. Last checked: .