GOV.UK Frontend v5.10.0
To install this version with npm, run npm install govuk-frontend@5.10.0
. You can also find more information about how to stay up to date in our documentation.
New features
Prepare to use the refreshed GOV.UK brand
We’ve added features to GOV.UK Frontend to implement GOV.UK’s refreshed brand. Ahead of the brand’s go-live date of 25 June 2025, prepare your service by updating its code. You’ll then need to deploy the changes to production on 25 June 2025 or as soon after this date as possible.
These changes affect these components:
These changes also affect the theme-color
metadata and assets, including:
- icons
- Open Graph image
manifest.json
To help you get ready, we've published this release, which includes several features to make the necessary updates across your service:
- updated markup for the GOV.UK header component (with the refreshed logo) and GOV.UK footer component (adding the crown logo)
- a new
govuk-template--rebranded
HTML class to apply updated styles from our CSS - a new set of assets for icons, Open Graph image and page metadata
You’ll need to serve the new assets in your service. What you’ll need to do after that depends on the code in your service and if you use GOV.UK Frontend:
- with its Nunjucks page template and macros
- with its Nunjucks macros (without the page template)
- without using Nunjucks
- using the Prototype Kit
Add the brand refresh assets to your project
GOV.UK Frontend provides updated assets for the icons, Open Graph image and manifest.json
to reflect the refreshed brand. These assets are available in the dist/govuk/assets/rebrand
folder of the package.
If you serve the assets from the GOV.UK Frontend assets folder, make sure the assets inside the dist/govuk/assets/rebrand
folder are served correctly at <YOUR-SITE-URL>/assets/rebrand
.
If you copy the font and image files into your application, you’ll need to copy the dist/govuk/assets/rebrand
folder to <YOUR-APP>/assets/rebrand
. If you use an automated task to copy the files, you may need to update your task to automatically copy our new folder.
Use the refreshed GOV.UK brand if you're using our Nunjucks page template
If you can edit your Nunjucks environment, you can add a govukRebrand
global value to your environment, with a value of true
. This global value makes the affected components use new styles for the brand refresh and display updated assets (such as the refreshed logo in the GOV.UK header component and the crown in the GOV.UK footer component).
nunjucksEnv.addGlobal('govukRebrand', true)
If you cannot edit your Nunjucks environment, you can use our new govukRebrand
'variable' option from our page template, which makes:
- the Service navigation and Cookie banner components use new styles for the brand refresh
- the GOV.UK header and GOV.UK footer components rendered in the
header
andfooter
blocks display updated assets (such as the refreshed logo in the GOV.UK header component and the crown in the GOV.UK footer component)
If you’ve overridden the header
or footer
block, see the next sections to make sure your header or footer displays the updated assets.
Use set
to assign the govukRebrand
variable a value of true
and enable the new styles:
{% set govukRebrand = true %}
Do not place this snippet between any block
and endblock
lines. Place it on a separate line.
If you’ve previously customised the template's assetPath
, assetUrl
or opengraphImageUrl
options, you may need to update these to point to the location of the updated icons, Open Graph image and manifest.json
.
Use the refreshed GOV.UK brand if you're using Nunjucks macro (without the page template)
You can do this by adding the updated styles for these components:
Add the govuk-template--rebranded
class to the <html>
element of your page to apply the updated styles to all affected components.
Enable the refreshed GOV.UK logo by adding rebrand: true
to the GOV.UK header component configuration.
{{ govukHeader({
rebrand: true
}) }}
Enable the GOV.UK crown in the GOV.UK footer component by addingrebrand: true
to the component configuration.
{{ govukFooter({
rebrand: true
}) }}
Update the links to the assets. Change the HTML inside your <head>
element to use the new file locations (from /assets/
to /assets/rebrand/
) and theme-color
. Replace any existing definitions.
<meta name="theme-color" content="#1d70b8">
<link rel="icon" sizes="48x48" href="/assets/rebrand/images/favicon.ico">
<link rel="icon" sizes="any" href="/assets/rebrand/images/favicon.svg" type="image/svg+xml">
<link rel="mask-icon" href="/assets/rebrand/images/govuk-icon-mask.svg" color="#1d70b8">
<link rel="apple-touch-icon" href="/assets/rebrand/images/govuk-icon-180.png">
<link rel="manifest" href="/assets/rebrand/manifest.json">
<meta property="og:image" content="<SERVICE URL>/assets/rebrand/images/govuk-opengraph-image.png">
Use the refreshed GOV.UK brand if you're not using Nunjucks
You also can use the refreshed GOV.UK brand if you’re not using Nunjucks.
Start by adding the govuk-template--rebranded
class to the <html>
element of your page to apply the updated styles to all affected components.
As you make changes, use the examples on our website to check your updates:
Replace the <svg>
element in your header with the following SVG code to display the refreshed GOV.UK logo:
<svg
xmlns="http://www.w3.org/2000/svg"
focusable="false"
role="img"
viewBox="0 0 324 60"
height="30"
width="162"
fill="currentcolor"
class="govuk-header__logotype"
aria-label="GOV.UK">
<title>GOV.UK</title>
<g>
<circle cx="20" cy="17.6" r="3.7"></circle>
<circle cx="10.2" cy="23.5" r="3.7"></circle>
<circle cx="3.7" cy="33.2" r="3.7"></circle>
<circle cx="31.7" cy="30.6" r="3.7"></circle>
<circle cx="43.3" cy="17.6" r="3.7"></circle>
<circle cx="53.2" cy="23.5" r="3.7"></circle>
<circle cx="59.7" cy="33.2" r="3.7"></circle>
<circle cx="31.7" cy="30.6" r="3.7"></circle>
<path d="M33.1,9.8c.2-.1.3-.3.5-.5l4.6,2.4v-6.8l-4.6,1.5c-.1-.2-.3-.3-.5-.5l1.9-5.9h-6.7l1.9,5.9c-.2.1-.3.3-.5.5l-4.6-1.5v6.8l4.6-2.4c.1.2.3.3.5.5l-2.6,8c-.9,2.8,1.2,5.7,4.1,5.7h0c3,0,5.1-2.9,4.1-5.7l-2.6-8ZM37,37.9s-3.4,3.8-4.1,6.1c2.2,0,4.2-.5,6.4-2.8l-.7,8.5c-2-2.8-4.4-4.1-5.7-3.8.1,3.1.5,6.7,5.8,7.2,3.7.3,6.7-1.5,7-3.8.4-2.6-2-4.3-3.7-1.6-1.4-4.5,2.4-6.1,4.9-3.2-1.9-4.5-1.8-7.7,2.4-10.9,3,4,2.6,7.3-1.2,11.1,2.4-1.3,6.2,0,4,4.6-1.2-2.8-3.7-2.2-4.2.2-.3,1.7.7,3.7,3,4.2,1.9.3,4.7-.9,7-5.9-1.3,0-2.4.7-3.9,1.7l2.4-8c.6,2.3,1.4,3.7,2.2,4.5.6-1.6.5-2.8,0-5.3l5,1.8c-2.6,3.6-5.2,8.7-7.3,17.5-7.4-1.1-15.7-1.7-24.5-1.7h0c-8.8,0-17.1.6-24.5,1.7-2.1-8.9-4.7-13.9-7.3-17.5l5-1.8c-.5,2.5-.6,3.7,0,5.3.8-.8,1.6-2.3,2.2-4.5l2.4,8c-1.5-1-2.6-1.7-3.9-1.7,2.3,5,5.2,6.2,7,5.9,2.3-.4,3.3-2.4,3-4.2-.5-2.4-3-3.1-4.2-.2-2.2-4.6,1.6-6,4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v13.5h-8.7"></path>
</svg>
Update the HTML inside your <footer>
element by adding the following SVG code at the start of the <div>
with the govuk-width-container
class.
<svg
xmlns="http://www.w3.org/2000/svg"
focusable="false"
role="presentation"
viewBox="0 0 64 60"
height="30"
width="32"
fill="currentcolor"
class="govuk-footer__crown">
<g>
<circle cx="20" cy="17.6" r="3.7"></circle>
<circle cx="10.2" cy="23.5" r="3.7"></circle>
<circle cx="3.7" cy="33.2" r="3.7"></circle>
<circle cx="31.7" cy="30.6" r="3.7"></circle>
<circle cx="43.3" cy="17.6" r="3.7"></circle>
<circle cx="53.2" cy="23.5" r="3.7"></circle>
<circle cx="59.7" cy="33.2" r="3.7"></circle>
<circle cx="31.7" cy="30.6" r="3.7"></circle>
<path d="M33.1,9.8c.2-.1.3-.3.5-.5l4.6,2.4v-6.8l-4.6,1.5c-.1-.2-.3-.3-.5-.5l1.9-5.9h-6.7l1.9,5.9c-.2.1-.3.3-.5.5l-4.6-1.5v6.8l4.6-2.4c.1.2.3.3.5.5l-2.6,8c-.9,2.8,1.2,5.7,4.1,5.7h0c3,0,5.1-2.9,4.1-5.7l-2.6-8ZM37,37.9s-3.4,3.8-4.1,6.1c2.2,0,4.2-.5,6.4-2.8l-.7,8.5c-2-2.8-4.4-4.1-5.7-3.8.1,3.1.5,6.7,5.8,7.2,3.7.3,6.7-1.5,7-3.8.4-2.6-2-4.3-3.7-1.6-1.4-4.5,2.4-6.1,4.9-3.2-1.9-4.5-1.8-7.7,2.4-10.9,3,4,2.6,7.3-1.2,11.1,2.4-1.3,6.2,0,4,4.6-1.2-2.8-3.7-2.2-4.2.2-.3,1.7.7,3.7,3,4.2,1.9.3,4.7-.9,7-5.9-1.3,0-2.4.7-3.9,1.7l2.4-8c.6,2.3,1.4,3.7,2.2,4.5.6-1.6.5-2.8,0-5.3l5,1.8c-2.6,3.6-5.2,8.7-7.3,17.5-7.4-1.1-15.7-1.7-24.5-1.7h0c-8.8,0-17.1.6-24.5,1.7-2.1-8.9-4.7-13.9-7.3-17.5l5-1.8c-.5,2.5-.6,3.7,0,5.3.8-.8,1.6-2.3,2.2-4.5l2.4,8c-1.5-1-2.6-1.7-3.9-1.7,2.3,5,5.2,6.2,7,5.9,2.3-.4,3.3-2.4,3-4.2-.5-2.4-3-3.1-4.2-.2-2.2-4.6,1.6-6,4-4.6-3.7-3.7-4.2-7.1-1.2-11.1,4.2,3.2,4.3,6.4,2.4,10.9,2.5-2.8,6.3-1.3,4.9,3.2-1.8-2.7-4.1-1-3.7,1.6.3,2.3,3.3,4.1,7,3.8,5.4-.5,5.7-4.2,5.8-7.2-1.3-.2-3.7,1-5.7,3.8l-.7-8.5c2.2,2.3,4.2,2.7,6.4,2.8-.7-2.3-4.1-6.1-4.1-6.1h10.6,0Z"></path>
</g>
</svg>
Update the links to the assets. Change the HTML inside your <head>
element to use the new file locations (from /assets/
to /assets/rebrand/
) and theme-color
. Replace any existing definitions.
<meta name="theme-color" content="#1d70b8">
<link rel="icon" sizes="48x48" href="/assets/rebrand/images/favicon.ico">
<link rel="icon" sizes="any" href="/assets/rebrand/images/favicon.svg" type="image/svg+xml">
<link rel="mask-icon" href="/assets/rebrand/images/govuk-icon-mask.svg" color="#1d70b8">
<link rel="apple-touch-icon" href="/assets/rebrand/images/govuk-icon-180.png">
<link rel="manifest" href="/assets/rebrand/manifest.json">
<meta property="og:image" content="<SERVICE URL>/assets/rebrand/images/govuk-opengraph-image.png">
Use the refreshed GOV.UK brand in your Prototype Kit prototype
If you use GOV.UK Frontend in a Prototype Kit prototype, enable the refreshed brand by adding the following to your prototype's app/config.json
:
"plugins": {
"govuk-frontend": {
"rebrand": true
}
}
Pull requests
These changes were made in the following pull requests:
- #5794: Add redesigned header component
- #5796: Update template background colour and components using it
- #5797: Add refreshed brand to service navigation component
- #5798: Add mixin to help rebrand specific properties
- #5800: Update favicons, app icons and OpenGraph image
- #5804: Use logo in new Footer design
- #5806: Update background colour of Cookie banner for brand refresh
- #5810: Update logo SVG
- #5853: Add rebrand variable to page template
- #5857: Increase spacing in logo to 3 dots, increase viewbox size
- #5870: Service navigation spacing adjustments
- #5872: Improvements to the rebranded footer in forced colors mode
- #5874: Add checks for
govukRebrand
Nunjucks global - #5877: Update prototype kit plugin rebrand function to be specific to govuk-frontend
- #5883: Fix old wordmark using incorrect coordinates
Other changes
The GOV.UK footer component top border is now consistent with GOV.UK
We've updated the border of the GOV.UK footer component so it matches the border used on the GOV.UK website. This will provide a more consistent experience for users as they navigate from the GOV.UK website and into services.
This change was introduced in pull request #5792: Update footer top border to be consistent with GOV.UK.
The Royal Arms in the GOV.UK footer component now matches the text colour
We've updated the colour of the Royal Arms in the GOV.UK footer so it matches the text colour in browsers supporting the mask-image
CSS property.
This improves its accessibility and reduces the number of colours used in the footer.
This change was introduced in pull request #5801: Update colour of the copyright logo using CSS
Deprecated features
Deprecation of $govuk-canvas-background-colour
The responsibilities of the $govuk-canvas-background-colour
variable were unclear, as the variable name and the description in the Sass API did not reflect how we were using it.
We’re replacing it with the $govuk-template-background-colour
variable, which you can use to get the background colour of the <html>
elements and of elements that need to match for visual continuity, such as the GOV.UK footer and Cookie banner components.
If you were using $govuk-canvas-background-colour
to match the background colour of the <html>
element, use $govuk-template-background-colour
instead.
If you were using $govuk-canvas-background-colour
to set the background colour in your custom styling to light-grey
, use govuk-colour('light-grey')
instead.
This change was introduced in pull request #5790: Deprecate $govuk-canvas-background-colour
, use $govuk-template-background-colour
instead
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
- #5785: Add missing Sass imports of components depended on - thanks to @matthew-shaw for reporting this issue and proposing a fix
- #5863: Omit ‘empty’ nav items from service navigation – thanks to @NikhilNanjappa for reporting this issue