nhsuk / nhsuk-service-manual-community-backlog

This is a place for digital teams in the NHS to work together and develop the NHS digital service manual.
https://service-manual.nhs.uk/community-and-contribution
62 stars 5 forks source link

Password input #521

Open sarawilcox opened 6 months ago

sarawilcox commented 6 months ago

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

paulrobertlloyd commented 6 months ago

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:

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 commented 6 months ago

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