Components

Back link

Use the back link component to help users go back to the previous page in a multi-page transaction.

Props
NameTypeDefaultDescription
idother'id' attribute to place on the base HTML element
classBlockotherBlock name override in BEM style classes applied to all elements
classModifiersotherBEM style modifiers to apply to the base HTML element
classNameotherExtra classes to apply to the base HTML element
hrefotherThe location to link to
textotherThe text of the link
titleotherThe title of the link

When to use this component

Always include the back link component on GOV.UK question pages.

You can include a back link on other pages within a multi-page transaction, if it makes sense to do so.

When not to use this component

Never use the back link component together with breadcrumbs. If necessary, you should do research with your users to learn which they find more helpful in your service.

How it works

Always place back links at the top of a page.

Make sure the link takes users to the previous page they were on, in the state they last saw it. Where possible, ensure it works even when JavaScript is not available.

If this is not possible, you should hide the back link when JavaScript is not available.

<a
  class="govuk-back-link govuk-back-link--active"
  href="#"
>
  Back
</a>
<BackLink href="#" />

Using the default link text (‘Back’) is ideal for services with a simple journey. For example, applying for a National Insurance number. Users will only ever go back to the previous page in the service.

For more complex user journeys, consider using different link text, like ‘Go back to [page]’. For example, in an admin system with many different areas. In this case, if you used ‘Back’, it might not be clear to users what they are going back to.

Back links on dark backgrounds

Use the govuk-back-link--inverse modifier class to show a white link on a dark background – for example, in headers, custom components, and patterns with darker backgrounds.

Make sure all users can see the back link – the background colour must have a contrast ratio of at least 4.5:1 with white.

<div class="govuk-panel govuk-panel--interruption">
  <div class="govuk-panel__body">
    <a
      class="govuk-back-link govuk-back-link--active govuk-back-link--inverse"
      href="#"
    >
      Back
    </a>
  </div>
</div>
<Panel classModifiers="interruption">
  <BackLink classModifiers="inverse" href="#" />
</Panel>

Custom text

A back link with customised text.

<a
  class="govuk-back-link govuk-back-link--active"
  href="#"
>
  Yn ôl
</a>
<BackLink href="#" text="Yn ôl" />

No HREF

A back link which relies on Javascript to go back as no href propery has been provided.

<a class="govuk-back-link" href="#">Back</a>
<BackLink />