Page structure
Page heading
The top of an inner page in the institution’s colour: the page’s title, a line above it and a short summary.
When to use
- At the top of an account, to welcome people and show what they have: “Welcome back, Ama”.
- At the top of a warning page, with
ggds-page-heading--danger: “Flood warning: low-lying areas near rivers”. - At the start of a service or a section that needs to stand out from ordinary pages.
When not to use
- On the homepage: use the hero.
- On question pages in a form: keep them plain, with the question as the
<h1>. - On every page of a site: it loses its meaning.
- For a site-wide message: use an urgent notice.
How to use
- Put it first in
<main>, full width, with aggds-containerinside. - Make the title the page’s
<h1>. - Use the line above for context, such as the account holder or when a warning was updated. Keep the summary to one or two sentences.
- Add key figures with
ggds-key-figures--inverseif people need a few numbers first. - Use
ggds-page-heading--dangeronly while a warning is in force.
Do
- Make the title say what the page is for.
Don't
- Put forms or long text in the page heading.
Accessibility
What GGDS does
- It uses the theme’s deep colour, which every GGDS theme checks for 4.5 to 1 contrast with white text (WCAG 1.4.3). The danger colour is checked too.
- Links in it are white and underlined.
- In Windows contrast themes it keeps a border, and it prints as plain black text.
What you need to do
- Make the title the page’s only
<h1>. - If you set your own colour, check it with
institutionCss, which refuses one too light for white text.
Example: An account’s welcome
<div class="ggds-page-heading">
<div class="ggds-container">
<p class="ggds-page-heading__eyebrow">Owusu Trading Enterprise · EX-BN-2024-0081</p>
<h1 class="ggds-page-heading__title">Welcome back, Ama</h1>
<ul class="ggds-key-figures ggds-key-figures--inverse">
<li class="ggds-key-figure"><p class="ggds-key-figure__value">3</p><p class="ggds-key-figure__label">applications in progress</p></li>
<li class="ggds-key-figure"><p class="ggds-key-figure__value">GH₵ 1,250</p><p class="ggds-key-figure__label">paid this year</p></li>
<li class="ggds-key-figure"><p class="ggds-key-figure__value">2</p><p class="ggds-key-figure__label">new messages</p></li>
</ul>
</div>
</div><div className="ggds-page-heading">
<div className="ggds-container">
<p className="ggds-page-heading__eyebrow">Owusu Trading Enterprise · EX-BN-2024-0081</p>
<h1 className="ggds-page-heading__title">Welcome back, Ama</h1>
<ul className="ggds-key-figures ggds-key-figures--inverse">
<li className="ggds-key-figure"><p className="ggds-key-figure__value">3</p><p className="ggds-key-figure__label">applications in progress</p></li>
<li className="ggds-key-figure"><p className="ggds-key-figure__value">GH₵ 1,250</p><p className="ggds-key-figure__label">paid this year</p></li>
<li className="ggds-key-figure"><p className="ggds-key-figure__value">2</p><p className="ggds-key-figure__label">new messages</p></li>
</ul>
</div>
</div>Example: A warning in force
<div class="ggds-page-heading ggds-page-heading--danger">
<div class="ggds-container">
<p class="ggds-page-heading__eyebrow"><svg class="ggds-icon ggds-icon--sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M12 4 2.5 20h19z"/><path d="M12 10v4M12 17h.01"/></svg> Warning in force · Updated 10 November 2026, 11:40am</p>
<h1 class="ggds-page-heading__title">Flood warning: low-lying areas near rivers</h1>
<p class="ggds-page-heading__lede">Heavy rain is expected until 6pm. If you live near a river or a drain, <a href="/warnings/flood/">act now</a>.</p>
</div>
</div><div className="ggds-page-heading ggds-page-heading--danger">
<div className="ggds-container">
<p className="ggds-page-heading__eyebrow"><svg className="ggds-icon ggds-icon--sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><path d="M12 4 2.5 20h19z" /><path d="M12 10v4M12 17h.01" /></svg> Warning in force · Updated 10 November 2026, 11:40am</p>
<h1 className="ggds-page-heading__title">Flood warning: low-lying areas near rivers</h1>
<p className="ggds-page-heading__lede">Heavy rain is expected until 6pm. If you live near a river or a drain, <a href="/warnings/flood/">act now</a>.</p>
</div>
</div>Use it
- Stylesheet
ggds.cssincludes it. To load only the parts you use:core.css, thencomponents/page-heading.css(0.4 KB with gzip, minified).- JavaScript
- None needed.
HTML
Copy the HTML under each example above. It works in any website.
Astro
No Astro component: copy the HTML.
React and Next.js
With @ggds/react:
import { PageHeading, KeyFigures } from '@ggds/react';
<PageHeading eyebrow="Owusu Trading Enterprise · EX-BN-2024-0081" title="Welcome back, Ama">
<KeyFigures inverse figures={[{ value: '3', label: 'applications in progress' }, { value: 'GH₵ 1,250', label: 'paid this year' }]} />
</PageHeading>Django
With ggds-django ({% load ggds %}):
{% ggds_page_heading "Welcome back, Ama" eyebrow="Owusu Trading Enterprise" %}Classes and states
| Class | What it does |
|---|---|
.ggds-page-heading | The heading area: full width, in the institution’s deep colour. |
.ggds-page-heading--danger | For a warning in force: the danger red. |
.ggds-page-heading__eyebrow | The line above the title: context, such as who or when. |
.ggds-page-heading__title | The page’s <h1>. |
.ggds-page-heading__lede | One or two sentences under the title. |
Accessibility tests
Automated, on every change
These run each time GGDS changes. A change that fails one is not accepted.
- WCAG 2.2 A and AA rules (axe), at desktop and phone widths, on every example
- No sideways scrolling on a 320px screen, also with a wide font, on every example
- Every approved colour pair meets its contrast minimum, for every institution theme
- No inline scripts or styles, so it runs under a strict Content Security Policy
By people, with assistive technology
Automated tests find only some of the barriers people meet. These checks are still to be done.
| Check | Result | Notes |
|---|---|---|
| Keyboard only | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| NVDA screen reader with Firefox or Chrome (Windows) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| JAWS screen reader with Chrome (Windows) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| VoiceOver screen reader with Safari (iPhone) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| TalkBack screen reader with Chrome (Android) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| Zoom to 400%, and increased text spacing | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| Windows contrast themes (forced colours) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| Voice control (Voice Access or Dragon) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
Changes
| Version | Change |
|---|---|
| 0.3.0 | New: page heading, the top of an inner page in the institution's colour, with the page's <h1>, for an account's welcome or a service's start; ggds-page-heading--danger for a warning in force. |
| 0.1.0 | Added. |
Related components
Something wrong, unclear or missing? or suggest a change to it on GitHub. You need a GitHub account.