Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.
<div class="nhsuk-action-link">
<a class="nhsuk-action-link__link" href="#">
<svg class="nhsuk-icon nhsuk-icon__arrow-right-circle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" width="36" height="36">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 2a10 10 0 0 0-9.95 9h11.64L9.74 7.05a1 1 0 0 1 1.41-1.41l5.66 5.65a1 1 0 0 1 0 1.42l-5.66 5.65a1 1 0 0 1-1.41 0 1 1 0 0 1 0-1.41L13.69 13H2.05A10 10 0 1 0 12 2z"></path>
</svg>
<span class="nhsuk-action-link__text">Find a minor injuries unit</span>
</a>
</div>
Nunjucks macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
Name | Type | Required | Description |
---|---|---|---|
text | string | true | Text to use within the action link component. |
href | string | true | The value of the link href attribute. |
openInNewWindow | boolean | false | If set to true, then the link will open in a new window. |
classes | string | false | Classes to add to the anchor tag. |
attributes | object | false | HTML attributes (for example data attributes) to add to the anchor tag. |
{% from 'action-link/macro.njk' import actionLink %}
{{ actionLink({
text: "Find a minor injuries unit",
href: "#"
}) }}
When to use action links
Use action links to signpost the start of a digital service.
When not to use action links
Do not use action links in forms. Use a button instead.
We don't use action links just to link to another page or site. If you need a link to stand out, you can use inset text.
How to use action links
Keep the words on the action link short. Start with a verb, for example: "Book an appointment" or "Apply for an EHIC card".
Action links usually sit in a block of text. You can also put one in a care card. (Find out more about helping users decide when and where to get care, with care cards.)
You can have more than one action link on a page but avoid putting them near each other.
Accessibility
The link colour and background colour contrast ratio is 5.76:1, which passes AAA guidelines at that font size.
Research
We tested the action links on health information pages with lots of content, callout boxes and multi-page navigation.
Users didn't notice early versions, so we made the size of the text larger than body text size.
We used NHS blue first but users didn't notice it. So we changed the arrow colour to green - our "action" colour. Users seemed to see the green better.
In follow-up tests on busy content pages, users pointed out the action links and said they found them useful.
Get in touch to share your research findings about this pattern.
Help us improve this guidance
Share insights or feedback and take part in the discussion. We use GitHub as a collaboration space. All the information on it is open to the public.
Read more about how to feedback or share insights.
If you have any questions, get in touch with the service manual team.
Updated: November 2021