GC Design System Components
Home 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 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

Build a header component

Use this header landmark to communicate a Government of Canada digital service or product.

Coding and accessibility for the header

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.

Get your code

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
2025-04-07