Password reveal
<div class="govuk-form-group">
<label class="govuk-label govuk-label--m" for="password">
Password
</label>
<input class="govuk-input govuk-input--width-20" id="password" name="password" type="password" value="1234ABC!" data-module="moj-password-reveal">
</div>
{%- from "govuk/components/input/macro.njk" import govukInput -%}
{{ govukInput({
id: "password",
attributes: {"data-module": "moj-password-reveal"},
classes: "govuk-input--width-20",
name: "password",
type: "password",
label: {
text: "Password",
classes: 'govuk-label--m'
},
value: "1234ABC!"
}) }}
This component is in the ‘Assets’ tab in the MoJ Figma Kit.
If you’re external to MoJ, download the Kit and add it as a library to your Figma files. You’ll need to re-add the kit to update the version.
When to use
Use the password reveal component to let users check their password safely.
This component automatically sets the spellcheck
attribute to false
to prevent users' passwords being stored in their browsers.
Get help and contribute
Get help
You can contact the MoJ Design System team for help or support using this component.
Help improve this component
The MoJ Design System team would like to hear:
- how you have used this component in your service
- any feedback you have about its usage, for example accessibility or ideas for improvement
Add these comments to the password reveal discussion on Github.