Content
Key figures
The few numbers that matter most on a page, each with what it measures, large enough to take in at a glance.
When to use
- At the top of a page of statistics or open data: “755 mm average rainfall”.
- On a dashboard or an account: “3 applications in progress”, “GH₵ 1,250 paid this year”.
- In a staff tool, to show the size of a queue and what is overdue.
When not to use
- For more than 4 numbers: put them in a table.
- For a number people need to compare across many rows, such as each region: use a table, with a meter if a picture helps.
- For a reference number at the end of a service: use the confirmation panel.
How to use
- Use 2 to 4 figures. Put the most important first.
- Keep the value short, with its unit: “755 mm”, “GH₵ 1,250”, “3.2 days”. Write the label in lower case after it, so they read as one phrase: “755 mm average rainfall”.
- Say what a change is compared with, in words: “7% above normal”, “5 more than last year”. Do not show only an arrow or a colour.
- Use
ggds-key-figure--dangerfor a figure that needs action, such as “5 overdue”. The label must say why. - On a page heading or another dark background, add
ggds-key-figures--inverse. - Say when the figures were last updated, near them.
Do
- Give the unit with every value.
- Say what a change is compared with.
Don't
- Round so far that the number misleads.
- Use colour alone to say a figure is good or bad.
Accessibility
What GGDS does
- The figures are a list, so screen readers say how many there are before reading them (WCAG 1.3.1).
- Values wrap rather than make a 320px screen scroll sideways (WCAG 1.4.10).
- The danger edge is extra: the words carry the meaning (WCAG 1.4.1). In Windows contrast themes every edge keeps showing.
What you need to do
- Write each value and label so they make sense read together, without the layout.
- If the figures change while the page is open, do not announce every change: update them quietly.
Example: Key figures
<ul class="ggds-key-figures">
<li class="ggds-key-figure">
<p class="ggds-key-figure__value">755 mm</p>
<p class="ggds-key-figure__label">average rainfall</p>
<p class="ggds-key-figure__change">7% above normal</p>
</li>
<li class="ggds-key-figure">
<p class="ggds-key-figure__value">18</p>
<p class="ggds-key-figure__label">days of heavy rain</p>
<p class="ggds-key-figure__change">5 more than last year</p>
</li>
<li class="ggds-key-figure ggds-key-figure--danger">
<p class="ggds-key-figure__value">3</p>
<p class="ggds-key-figure__label">regions with a flood warning</p>
<p class="ggds-key-figure__change"><a href="/warnings/">See the warnings</a></p>
</li>
</ul>
<p class="ggds-hint">Example figures only. Updated 10 November 2026 at 6am.</p><>
<ul className="ggds-key-figures">
<li className="ggds-key-figure">
<p className="ggds-key-figure__value">755 mm</p>
<p className="ggds-key-figure__label">average rainfall</p>
<p className="ggds-key-figure__change">7% above normal</p>
</li>
<li className="ggds-key-figure">
<p className="ggds-key-figure__value">18</p>
<p className="ggds-key-figure__label">days of heavy rain</p>
<p className="ggds-key-figure__change">5 more than last year</p>
</li>
<li className="ggds-key-figure ggds-key-figure--danger">
<p className="ggds-key-figure__value">3</p>
<p className="ggds-key-figure__label">regions with a flood warning</p>
<p className="ggds-key-figure__change"><a href="/warnings/">See the warnings</a></p>
</li>
</ul>
<p className="ggds-hint">Example figures only. Updated 10 November 2026 at 6am.</p>
</>Use it
- Stylesheet
ggds.cssincludes it. To load only the parts you use:core.css, thencomponents/key-figures.css(0.5 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 { KeyFigures } from '@ggds/react';
<KeyFigures figures={[
{ value: '755 mm', label: 'average rainfall', change: '7% above normal' },
{ value: '3', label: 'regions with a flood warning', danger: true },
]} />Django
With ggds-django ({% load ggds %}):
{# figures: dicts with value, label, and optionally change and danger #}
{% ggds_key_figures figures %}Classes and states
| Class | What it does |
|---|---|
.ggds-key-figures | The list of figures: a <ul>. As many columns as fit; one on phones. |
.ggds-key-figures--inverse | For a dark background, such as a page heading: white text and outlines. |
.ggds-key-figure | One figure: an <li>, with an edge in the institution’s colour. |
.ggds-key-figure--danger | A figure that needs action, such as “5 overdue”: a red edge. Say why in the label. |
.ggds-key-figure__value | The number, with its unit: large and bold. |
.ggds-key-figure__label | What it measures. |
.ggds-key-figure__change | Optional: how it has changed, and compared with what, in words. |
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: key figures, the 2 to 4 numbers that matter most on a page, each with what it measures and how it has changed, in words. ggds-key-figure--danger for one that needs action, ggds-key-figures--inverse on a page heading. |
| 0.1.0 | Added. |
Related components
Something wrong, unclear or missing? or suggest a change to it on GitHub. You need a GitHub account.