Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password input #521

Open
sarawilcox opened this issue May 20, 2024 · 2 comments
Open

Password input #521

sarawilcox opened this issue May 20, 2024 · 2 comments
Labels
component Goes in the 'Components' section of the service manual public-facing staff-facing

Comments

@sarawilcox
Copy link
Collaborator

GOV.UK has a password input component to help users to create and enter passwords.
https://design-system.service.gov.uk/components/password-input/

@sarawilcox sarawilcox added component Goes in the 'Components' section of the service manual public-facing staff-facing labels May 20, 2024
@paulrobertlloyd
Copy link

The Manage vaccinations in schools (Mavis) service has implemented this pattern. We’re largely importing this component as is, swapping out the govuk-* for the nhsuk-* namespace where relevant.

We’ve also made a few changes to make the secondary button component work for this use case, namely:

  • Using a normal font weight
  • Adjusting margin, padding and shadow sizing so that the button aligns with the input (and appears correctly when pressed). This is one area where the NHS.UK Design System’s button component is currently lacking; supporting the Password input component might be an opportunity to provide a smaller button variant that can be used alongside text inputs.

Without the adjustments:

Screenshot 2024-05-20 at 15 09 39

With the adjustments:

Screenshot 2024-05-20 at 15 02 59

The SCSS file that implements these adjustments can be found here: https://github.com/nhsuk/manage-vaccinations-in-schools/blob/main/app/assets/stylesheets/_password-input.scss

@edwardhorsford
Copy link

edwardhorsford commented May 23, 2024

NHS Login has a show/hide feature:
Screenshot 2024-05-23 at 14 27 39
Screenshot 2024-05-23 at 14 27 46

Implemented as a button element positioned over the input.

Note the actual input has right padding so the field scrolls before being obscured by the button:
Screenshot 2024-05-23 at 14 30 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component Goes in the 'Components' section of the service manual public-facing staff-facing
Development

No branches or pull requests

3 participants