GC Design System Components
GC Design System Start to use Page templates overview Basic page Components overview Breadcrumbs Button Card Checkboxes Container Date input Date modified Details Error message Error summary Fieldset File uploader Footer Grid Header Heading Icon Input Language toggle Link Notice Pagination Radios Screenreader-only Search Select Side navigation Signature Stepper Table Text Textarea Theme and topic menu Top navigation CSS shortcuts overview Reset styles Responsive layout State Box sizing Container sizing Display Overflow Position Visibility Font Font family Font size Font style Font weight Line height Link colour Link size Link text decoration List style Text align Text colour Text overflow Text transform Word break Margin Padding Align content Align items Align self Flex Flex direction Flex grow Flex shrink Flex wrap Gap Grid columns Grid rows Justify content Justify items Justify self Order Place content Place items Place self Background colour Border colour Border radius Border style Border width Icon names Icon size Image Cursor Pointer events Transition Styles overview Design tokens Colour tokens Spacing tokens Typography tokens Contact us Get involved Find a demo

Header
<gcds-header>

Also called: global header, brand header.

The header is the responsive Government of Canada branded header landmark.

  • Required on Canada.ca
  • Required on GC sites

Header component preview

On this page

Coding and accessibility for headers

GC Design System components are designed to adapt to the size of the screen or frame where they’re being viewed. As an exception, the text size in the header and footer is fixed.

Preserve the signature element in the header for GC sites

  • Maintain the signature for all GC sites.
  • Use the signature-variant attribute to set the Government of Canada signature to either colour or white. For white backgrounds, keep the colour default setting for the signature.
  • Always preserve the integrity of the Government of Canada signature. Avoid modifying it in any way, stretching, or changing the colours or text.
  • On Canada.ca pages, set the signature-has-link attribute to true to set the Government of Canada signature link to Canada.ca.

Include the language toggle on all GC sites

  • Include the language toggle by setting the lang-href attribute. Setting the lang-href also sets the href of the language toggle.
  • Use the lang attribute to set the site language and the toggle will offer the other Official Language.

Set up the skip-to-content to improve accessibility

  • Set up a skip-to-content link as a shortcut for people using an assistive technology and improve keyboard navigation.
  • Set the href of the skip-to-content link in the header’s top navigation using the skip-to-href attribute.
  • Use the skip-to-nav slot to replace the default top navigation with the skip-to-content link.
  • Pass a child element with the slot="skip-to-nav" attribute to place the element first in the header.

Include the breadcrumbs and search on Canada.ca sites

  • On Canada.ca pages, keep the default setting of hide-canada-link to false.
  • Add the breadcrumbs component by passing a child element with the slot="breadcrumb" attribute. This will place the breadcrumbs in the header below the language toggle, signature and search slot.
  • Add a new breadcrumbs link to the breadcrumbs component by using the gcds-breadcrumbs-item component. The link can be added through the href property.
  • Include a search form by adding by adding <gcds-search slot="search"></gcds-search> or passing a child element with the slot="search" attribute. This will place the element under the language toggle and beside the signature in the header.
  • Set the search to a local or global search form. By default, the component is set to search Canada.ca.

Set up a top navigation

  • Add a top navigation by passing a child element with the slot="menu" attribute. This will place the element in the header below the language toggle, signature, and search slots.
  • Opt to add a banner by passing a child element with the slot="banner" attribute. This will place the element across the top of the header under the skip-to-nav element.

Examples Explore the different ways you can configure the component. Each example shows a working implementation and ready-to-copy code.

In this section

Essential attributes These attributes are needed for the component to function correctly.

lang-href

The lang-href attribute specifies the URL of the same page in another language, typically English or French. Use this attribute to provide a link that allows users to switch between available language versions.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
</gcds-header>

skip-to-href

The skip-to-href attribute specifies the URL or anchor for the "Skip to content" link. This link allows users, especially those using assistive technologies, to quickly navigate to the main content of the page, improving accessibility.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
</gcds-header>

Optional attributes These attributes allow you to customize or extend the component’s behaviour and presentation.

The signature-has-link attribute determines whether the header signature links to Canada.ca. By default, it's set to true, which means the signature is clickable.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
</gcds-header>

When it's set to false, a non-clickable signature is displayed.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here" signature-has-link="false">
</gcds-header>

Slots The default slot allows you to inject custom content into the component’s primary content area, and named slots, into specific areas.

The banner slot is for adding a banner across the top of the header. Use this slot to display site-wide alerts or promotional messages.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <div slot="banner">Banner slot</div>
</gcds-header>

The breadcrumb slot is for adding breadcrumbs below the header. Use this slot to show the user’s current page location and navigation path.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <gcds-breadcrumbs slot="breadcrumb">
    <gcds-breadcrumbs-item href="#">Home page</gcds-breadcrumbs-item>
    <gcds-breadcrumbs-item href="#">Parent page link</gcds-breadcrumbs-item>
  </gcds-breadcrumbs>
</gcds-header>

The menu slot is for adding a navigation menu below the divider line. For instance, you can use the top-nav component within this slot to provide the site’s primary navigation links.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <gcds-top-nav label="Top navigation" alignment="right" slot="menu">
    <gcds-nav-link href="#home" slot="home">GC Notify</gcds-nav-link>
    <gcds-nav-link href="#">Why GC Notify</gcds-nav-link>
    <gcds-nav-link href="#">Contact us</gcds-nav-link>
  </gcds-top-nav>
</gcds-header>

The search slot is for adding a search field to the header. Use this slot to allow users to search site content directly from the header.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <gcds-search slot="search"></gcds-search>
</gcds-header>

signature

The signature slot is for replacing the default Government of Canada signature. Use this slot to display a custom signature or logo if needed.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <gcds-signature slot="signature"></gcds-signature>
</gcds-header>

skip-to-nav

The skip-to-nav slot is for adding a "skip to content" link at the top of the header. By default, the header includes a “skip to main content” link to improve accessibility for users of assistive technologies. The target for this default link can be set using the skip-to-href prop. Use this slot to add additional skip links or a custom “skip to content” link.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <gcds-link href="#main-content" slot="skip-to-nav">Skip to main content</gcds-link>
</gcds-header>

toggle

The toggle slot is for adding a custom language toggle in the header. By default, the header includes a language toggle that includes English and French. The target for this default language toggle can be set using the lang-href prop. Use this slot to add additional available languages.

<gcds-header lang-href="fr-url-here" skip-to-href="#id-main-content-here">
  <gcds-lang-toggle href="url-here" slot="toggle">
  </gcds-lang-toggle>
</gcds-header>

Code builder

Generate an instance of the component you need by selecting its code properties.

  1. Explore by choosing different code values to generate the instance you want.

  2. Get the code and pull it into your environment.

  3. Add any copy you need to the component (like text for a label).

Note: The code builder uses English for all code elements, which follows standard practice.

Help us improve

Have questions or a request? Give feedback on our contact form.

Something's wrong? Raise it through GitHub with an account. You'll have access to the team's direct responses, progress made on your issue, and issues raised by others.

Give feedback Report an issue on GitHub
2026-05-20