pattern-library checked

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.

Open source

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.

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: .