Buttons
Use buttons to help users to carry out an action.
How to use
We use the NHS design system button with a modifier class of nhsapp-button
to make buttons full width on smaller screens.
Primary button
To use the component in your design, add the NHS App Figma library to your working files, and navigate using the components tab.
To use the component in your Vue application, install the NHS App Vue Component Library and import the component.
Secondary button
Our secondary button design differs from the NHS design system. The research section below has more details about why.
Use a secondary button either:
- for secondary actions on a page
- when an action needs less prominence – for example because it is optional
To use the component in your design, add the NHS App Figma library to your working files, and navigate using the components tab.
To use the component in your Vue application, install the NHS App Vue Component Library and import the component.
Buttons on dark backgrounds (reverse button)
To use the component in your design, add the NHS App Figma library to your working files, and navigate using the components tab.
To use the component in your Vue application, install the NHS App Vue Component Library and import the component.
Grouping buttons
Use a button group when two or more buttons are placed together.
To use the component in your design, add the NHS App Figma library to your working files, and navigate using the components tab.
To use the component in your Vue application, install the NHS App Vue Component Library and import the component.
Any links within a button group will automatically align with the buttons.
To use the component in your design, add the NHS App Figma library to your working files, and navigate using the components tab.
To use the component in your Vue application, install the NHS App Vue Component Library and import the component.
Research
Full width buttons
Testing on the NHS App has found that full width buttons are not a problem for users with smaller screens. But we will continue to test if:
- full width buttons are problematic for users with low digital skills
- users don’t actually see them as actionable things to click
Secondary button
We designed the NHS App secondary button as an alternative to a secondary button with a grey background. This was because our research found some participants overlooked that design or believed it was a disabled button. Some participants hesitated before selecting the button. The visual hierarchy of primary and secondary buttons was also found to be unclear for people with monochromatic vision.
In moderated usability testing, six out of six participants were able to use the NHS App secondary button for a variety of actions and without hesitation. Two participants had colour vision deficiency (colour blindness).
Help improve this component
If you have used or researched this component, please let us know what you found so we can make it better for everyone.
Discuss 'Buttons' on GitHub where you can share anything you think might be useful.
You can also share feedback with us on Slack.