GOV.UK footer
Nunjucks macro options
Use options to customise the appearance, content and behaviour of this component when using a macro, for example, changing the text.
Also see the guidance on the GOV.UK footer component page, which shows these options in use within each example.
Some options are required for the macro to work; these are marked as "Required" in the option description. Deprecated options are marked as "Deprecated".
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.
Primary options
| object |
The meta section of the footer after any navigation, before the copyright and license information.
See macro options for meta.
|
| array |
The navigation section of the footer before a section break and the copyright and license information.
See macro options for navigation.
|
| object |
The content licence information within the footer component. If your service provides its information under a different license than OGL, use null to hide both the OGL logo and licence text. Defaults to Open Government Licence (OGL) v3 licence.
See macro options for contentLicence.
|
| object |
The copyright information in the footer component, this defaults to "© Crown copyright".
See macro options for copyright.
|
| string |
Classes that can be added to the inner container, useful if you want to make the footer full width.
|
| string |
Classes to add to the footer component container.
|
| object |
HTML attributes (for example data attributes) to add to the footer component container.
|
Options for navigation array objects
| string |
Required.
Title for a section.
|
| integer |
Amount of columns to display items in navigation section of the footer.
|
| string |
Width of each navigation section in the footer. You can pass any Design System grid width here – for example, "one-third", "two-thirds" or "one-half". Defaults to "full".
|
| array |
The items within the navigation section of the footer component.
See macro options for navigation items.
|
Options for navigation items array objects
| string |
Required.
List item text in the navigation section of the footer.
|
| string |
Required.
List item link href attribute in the navigation section of the footer. Both text and href attributes need to be present to create a link.
|
| object |
HTML attributes (for example data attributes) to add to the anchor in the footer navigation section.
|
Options for contentLicence object
| string |
If html is set, this is not required. If html is provided, the text option will be ignored. If neither are provided, the text for the Open Government Licence is used.
|
| string |
If text is set, this is not required. If html is provided, the text option will be ignored. If neither are provided, the text for the Open Government Licence is used. The content licence is inside a <span> element, so you can only add phrasing content to it.
|
Options for copyright object
| string |
If html is set, this is not required. If html is provided, the text option will be ignored. If neither are provided, "© Crown copyright" is used.
|
| string |
If text is set, this is not required. If html is provided, the text option will be ignored. If neither are provided, "© Crown copyright" is used. The copyright notice is inside an <a> element, so you can only use text formatting elements within it.
|