Components Internal service header

The internal service header shows users what service or system they are using.

<header class="govuk-header dwp-header" data-module="govuk-header">
<div class=" govuk-width-container ">
<a href="#" class="govuk-header__link govuk-header__link--service-name dwp-header__container--service-name">
    Service name
</a>
</div>
</header> 
.dwp-header {
background-color: #0b0c0c;
border-bottom: 0;
width: 100%;
}

.dwp-header__container {
border-bottom: 0;
padding: 10px 30px 0;
display: flex;
}

@media (max-width: 40.0525em) {
.dwp-header__container {
padding: 10px 15px 0;
}
}

.dwp-header__container--service-name {
width: 66.66%;
}

.dwp-header__container--action {
width: 33.33%;
}

.dwp-header__container--action .action {
float: right;
font-weight: 700;
margin-top: 2px;
}

@media (min-width: 40.0625em) {
.dwp-header__container--action .action {
margin-top: 5px;
}
} 
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 Description
name string Required.The service name
serviceHref string The service url
action string the action of a button
actionHref string The action url
container boolean Required.Whether to use the govuk width container
classes string Additional classes to add to the internal service header
attributes object HTML Attributes (data attributes) to add to the internal service header
{% from "internal-service-header/macro.njk" import dwpHeader %}

{{ dwpHeader({
name: "Service name",
serviceHref: '#',
container:true
}) }} 

When to use this component

Use this header for any service or system not on GOV.UK, such as internal and agent-facing services.

When not to use this component

If the service is hosted on a service.gov.uk domain it should use the GOV.UK Design System Header component.

How it works

The name of the service should be left-aligned in the header.

If your users can sign in or out of a service you should include a link for them to do this on the right-hand side of the header.

<header class="govuk-header dwp-header" data-module="govuk-header">
<div class=" govuk-width-container ">
<div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
        <a href="#" class="govuk-header__link govuk-header__link--service-name">
            Service name
        </a>
    </div>
    <div class="govuk-grid-column-one-third dwp-header__container--action">
        <a href="#" class="govuk-header__link action">
            Sign out
        </a>
    </div>
</div>
</div>
</header> 
.dwp-header {
background-color: #0b0c0c;
border-bottom: 0;
width: 100%;
}

.dwp-header__container {
margin-bottom: 0;
border-bottom: 0;
}

.dwp-header__container--service-name {
width: 66.66%;
float: left;
}

.dwp-header__container--sign-in {
width: 33.33%;
float: right;
}

.sign-in {
float: right;
font-weight: 700;
margin-top: 2px;
}

@media (min-width: 40.0625em) {
.sign-in {
margin-top: 5px;
}
} 
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 Description
name string Required.The service name
serviceHref string The service url
action string the action of a button
actionHref string The action url
container boolean Required.Whether to use the govuk width container
classes string Additional classes to add to the internal service header
attributes object HTML Attributes (data attributes) to add to the internal service header
{% from "internal-service-header/macro.njk" import dwpHeader %}

{{ dwpHeader({
name: "Service name",
serviceHref: "#",
action: "Sign out",
actionHref: "#",
container:true
}) }} 

Research

This component has been used on services across DWP, including

  • Move to Universal Credit
  • Apply for New Style Jobseeker’s Allowance

The internal service header has only been researched on agent-facing services. More research is needed on the component.

Have you used this component?

Please let us know what you found so we can make it better for everyone. There is an open discussion for this component on GitHub where you can share anything you think might be useful.

Discuss Internal service header on GitHub

Get in touch

If you’ve got a question, idea or suggestion email the Design System team on dwp-design-system@engineering.digital.dwp.gov.uk