Hide password by default; show toggle
hide-password-by-default-show-toggle
Hide passwords by default until the user chooses to show them with a show control.
Description
Hide passwords by default until the user chooses to show them. People may not be in a private space, so the value starts masked; a show control lets them visually check entry and reduce errors. Fail when the password is plain text by default, or when there is no way to reveal it to check what was typed. Use this for password create and enter fields, not for MFA codes or other secrets.
When to use
Creating or entering a password on a sign-in or account form.
Not when
Not for one-time codes, security questions, or other non-password secrets.
Agent hint
Default the field to hidden text and add a show control so people can check what they typed.
Password is hidden by default and a show control lets the user reveal what they typed.
Password is shown as plain text by default, or there is no way to reveal it to check entry.
Citations
GOV.UK Design System — Password input
https://design-system.service.gov.uk/components/password-input/