Generic header
Use this generic version of the header to tell users they’re using a government service that’s not part of the GOV.UK website.
<div class="govuk-generic-header">
<div class="govuk-generic-header__container govuk-width-container">
<div class="govuk-generic-header__logo">
<a href="#" class="govuk-generic-header__homepage-link">
<svg width="28" height="30" viewBox="0 0 28 30" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<circle cx="13.5549" cy="4.21349" r="4.21349" />
<circle cx="13.5549" cy="25.7865" r="4.21349" />
<circle cx="22.8963" cy="9.6068" r="4.21349" />
<circle cx="4.2135" cy="20.3932" r="4.21349" />
<circle cx="22.8963" cy="20.3932" r="4.21349" />
<circle cx="4.21351" cy="9.60674" r="4.21349" />
</svg> Service name
</a>
</div>
</div>
</div>
{% from "govuk/components/generic-header/macro.njk" import govukGenericHeader %}
{% set logoContent %}
<svg width="28" height="30" viewBox="0 0 28 30" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<circle cx="13.5549" cy="4.21349" r="4.21349"/>
<circle cx="13.5549" cy="25.7865" r="4.21349"/>
<circle cx="22.8963" cy="9.6068" r="4.21349"/>
<circle cx="4.2135" cy="20.3932" r="4.21349"/>
<circle cx="22.8963" cy="20.3932" r="4.21349"/>
<circle cx="4.21351" cy="9.60674" r="4.21349"/>
</svg> Service name
{% endset %}
{{ govukGenericHeader({
url: "#",
logoHtml: logoContent
}) }}
When to use this component
Use the Generic header component if your service is both:
- a public-facing government service
- not on the GOV.UK website (meaning that your service is not part of the GOV.UK proposition)
This is to bring consistency and maintain user trust in journeys that move between the GOV.UK website and other government websites and services.
This component also helps ensure your non-GOV.UK service does not:
- identify itself as being part of GOV.UK
- use the crown or GOV.UK logotype in the header
- use the GDS Transport typeface
- use the GOV.UK brand colours
See the guidance on if your service is not on GOV.UK in the Service manual.
When not to use this component
If your service is hosted on one of these gov.uk domains, you must use the GOV.UK header component instead:
- gov.uk/[myservice]
- [myservice].service.gov.uk
- [myblog].blog.gov.uk
How it works
If you use the page template, you’ll first need to replace the default GOV.UK header in the page template with the Generic header component.
Use the Generic header component to display your own:
- brand logo
- homepage link
- font for your service name (instead of GDS Transport)
You must also follow the steps in the Using GOV.UK Frontend without GOV.UK branding guidance to remove other GOV.UK brand elements elsewhere in your service.
Using your own brand logo
Follow your organisation’s guidelines and best practice to show your brand logo.
To make your logo image as accessible and optimised as possible, also see:
- Design System guidance on using images
- Image guidance for GOV.UK content and publishers
Homepage link
By default, the Generic header component links to /, which is the top level of your service’s domain. You should customise the link to point to wherever makes the most sense for your service.
Do not show service name or navigation links in the Generic header component
As with the GOV.UK header component, you should not use the Generic header component to show service name or navigation links. Use the Service navigation component instead.
Research on this component
When developing this component, we worked with a cross-government working group representing various government departments that work on services not hosted on GOV.UK.
We thank them for their work to gather the needs and considerations for consistent headers across all government services.
Help improve this component
To help make sure that this page is useful, relevant and up to date, you can:
- take part in the ‘Generic header’ discussion on GitHub and share your research
- propose a change on GitHub – read more about how to propose changes in GitHub
Need help?
If you’ve got a question about the GOV.UK Design System, contact the team.