Skip to main content

This is a draft (version 0.5.0). The National Information Technology Agency (NITA) plans to make GGDS official guidance for government websites after independent accessibility testing. What this means

Ghana Government Design System Design system for Government of Ghana websites – home Search

Foundations

The colours, text, spacing, layout, sizes, motion and icons that every GGDS component uses. They are called design tokens: named values such as --ggds-color-link, so a website never has to repeat a colour code.

Colour

GGDS uses one government blue for links, buttons and focus on every website. Each institution adds its own colour only on its theme parts: the line under the header, its name, the homepage hero, the footer and its card in a list.

The red, gold and green are the flag colours. They appear only as thin lines and bands, and as gold text on dark backgrounds. Their exact values will be updated when an official specification is published.

Can people read it?

Contrast is how much a colour stands out from what is behind it, written as a ratio: 1 to 1 is invisible, 21 to 1 is black on white. People with low vision, old screens or bright sunlight need enough of it.

  • Text needs at least 4.5 to 1 (WCAG 2.2 level AA).
  • Borders of form fields and the focus outline need at least 3 to 1, so people can see where to type and where they are.
  • White text on the hero and footer needs 7 to 1, because it carries your institution’s colour on every page.

These are all the colour combinations GGDS uses, measured when this page was built. If a change made any of them too faint, the build would stop.

Text

  • Body text on the page Easy to read: 16.0 to 1 (needs 4.5 to 1) --ggds-color-text on --ggds-color-surface
  • Body text on a grey panel Easy to read: 14.9 to 1 (needs 4.5 to 1) --ggds-color-text on --ggds-color-surface-sunken
  • Hints and secondary text on the page Easy to read: 7.5 to 1 (needs 4.5 to 1) --ggds-color-text-muted on --ggds-color-surface
  • Hints and secondary text on a grey panel Easy to read: 7.0 to 1 (needs 4.5 to 1) --ggds-color-text-muted on --ggds-color-surface-sunken
  • Secondary text on a light blue panel Easy to read: 7.0 to 1 (needs 4.5 to 1) --ggds-color-text-muted on --ggds-color-brand-50
  • Body text on a selected item Easy to read: 13.5 to 1 (needs 4.5 to 1) --ggds-color-text on --ggds-color-brand-100

Links

  • A link on the page Easy to read: 6.9 to 1 (needs 4.5 to 1) --ggds-color-link on --ggds-color-surface
  • A link on a grey panel Easy to read: 6.5 to 1 (needs 4.5 to 1) --ggds-color-link on --ggds-color-surface-sunken
  • A link under the pointer Easy to read: 13.3 to 1 (needs 4.5 to 1) --ggds-color-link-hover on --ggds-color-surface
  • A link already visited Easy to read: 9.9 to 1 (needs 4.5 to 1) --ggds-color-link-visited on --ggds-color-surface
  • White text on a main button Easy to read: 6.9 to 1 (needs 4.5 to 1) --ggds-color-text-inverse on --ggds-color-brand-700

Your institution’s colours

  • White text on the hero and footer Very easy to read: 7.1 to 1 (needs 7 to 1) --ggds-color-text-inverse on --ggds-color-institution-deep
  • The gold purpose line on the hero Easy to read: 4.8 to 1 (needs 4.5 to 1) --ggds-color-flag-gold on --ggds-color-institution-deep
  • Your institution’s name in the header Easy to read: 6.9 to 1 (needs 4.5 to 1) --ggds-color-institution on --ggds-color-surface

Forms and focus

  • The border of a form field Easy to see: 5.5 to 1 (needs 3 to 1) --ggds-color-border-control on --ggds-color-surface
  • The border of a form field on a grey panel Easy to see: 5.1 to 1 (needs 3 to 1) --ggds-color-border-control on --ggds-color-surface-sunken
  • The focus outline against its glow Easy to see: 11.9 to 1 (needs 3 to 1) --ggds-color-focus-ring on --ggds-color-focus-halo
  • The focus glow on the page Easy to see: 19.6 to 1 (needs 3 to 1) --ggds-color-focus-halo on --ggds-color-surface

Messages

  • A success message Easy to read: 5.9 to 1 (needs 4.5 to 1) --ggds-color-status-success-strong on --ggds-color-status-success-subtle
  • White text on a confirmation panel Easy to read: 6.6 to 1 (needs 4.5 to 1) --ggds-color-text-inverse on --ggds-color-status-success-strong
  • A warning message Easy to read: 6.9 to 1 (needs 4.5 to 1) --ggds-color-status-warning-strong on --ggds-color-status-warning-subtle
  • A danger message Easy to read: 5.7 to 1 (needs 4.5 to 1) --ggds-color-status-danger-strong on --ggds-color-status-danger-subtle
  • An error message under a form field Easy to read: 6.5 to 1 (needs 4.5 to 1) --ggds-color-status-danger-strong on --ggds-color-surface
  • An information message Easy to read: 6.9 to 1 (needs 4.5 to 1) --ggds-color-status-info-strong on --ggds-color-status-info-subtle
  • A neutral tag Easy to read: 6.6 to 1 (needs 4.5 to 1) --ggds-color-status-neutral-strong on --ggds-color-status-neutral-subtle

All colours

Colour tokens
SwatchTokenValueUse
--ggds-color-brand-50#f0f8fc
--ggds-color-brand-100#dceff9
--ggds-color-brand-500#0090d8Light blue. 3.5:1 on white: decoration and large text only, never body text or control borders
--ggds-color-brand-600#0073ad5.2:1 on white
--ggds-color-brand-700#005f8fLinks and main buttons (6.9:1 on white)
--ggds-color-brand-800#00496eCard titles and strong accents (9.6:1 on white)
--ggds-color-brand-900#00334dDeep surfaces; link hover (13.3:1 on white)
--ggds-color-institution#005f8fThe default theme colour (6.9:1 on white)
--ggds-color-institution-deep#005d8cDarker shade of the default theme, for the hero and footer (7.1:1 under white text)
--ggds-color-flag-red#ce1126
--ggds-color-flag-gold#fcd116
--ggds-color-flag-green#006b3f
--ggds-color-flag-black#000000
--ggds-color-text#14213d
--ggds-color-text-muted#4a5568
--ggds-color-text-inverse#ffffff
--ggds-color-link#005f8f
--ggds-color-link-hover#00334d
--ggds-color-link-visited#5b2a86NITA S&A Standard 6.4.14: read links marked by a standard colour convention
--ggds-color-border-subtle#d5dbe5Decoration only. Never the only boundary of a control.
--ggds-color-border-strong#9aa5b8Decoration only (2.5:1). Never the only boundary of a control.
--ggds-color-border-control#5c6a80Form control boundaries; at least 3:1 on every surface (WCAG 1.4.11)
--ggds-color-surface#ffffff
--ggds-color-surface-sunken#f5f7fa
--ggds-color-surface-raised#ffffff
--ggds-color-status-success-strong#0d6b3a
--ggds-color-status-success-subtle#e8f5ee
--ggds-color-status-warning-strong#7a4b00
--ggds-color-status-warning-subtle#fff6e0
--ggds-color-status-danger-strong#b3261e
--ggds-color-status-danger-subtle#fdecea
--ggds-color-status-info-strong#0b5394
--ggds-color-status-info-subtle#e8f1fb
--ggds-color-status-neutral-strong#4a5568
--ggds-color-status-neutral-subtle#eef1f5
--ggds-color-focus-ring#ffbf47
--ggds-color-focus-halo#0b0c0c

Text

GGDS uses the fonts already on each phone and computer, so nothing extra downloads on slow or costly connections.

Font size 3xl: Apply for a licence

Font size 2xl: Apply for a licence

Font size xl: Apply for a licence

Font size lg: Apply for a licence

Font size base: Apply for a licence

Font size sm: Apply for a licence

Font size xs: Apply for a licence

  • Body text is 17px (--ggds-font-size-base), larger than most websites, because many people read on small phones in bright light. Do not set body text smaller.
  • The two largest sizes grow with the screen, so headings fit a 320px phone without breaking words.
  • Use two weights only: regular for text, bold for headings and emphasis. Lines of text are at most 68 characters wide (--ggds-measure, the class ggds-measure).
  • Sizes are in rem, so they follow the text size people choose on their device.
Text tokens
TokenValueUse
--ggds-font-family-sanssystem-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serifThe fonts already on each device, so nothing extra downloads.
--ggds-font-family-monoui-monospace,SF Mono,Cascadia Mono,Roboto Mono,Menlo,monospace
--ggds-font-size-xs0.8125rem
--ggds-font-size-sm0.9375rem
--ggds-font-size-base1.0625rem17px reading size
--ggds-font-size-lg1.25rem
--ggds-font-size-xl1.5rem
--ggds-font-size-2xlclamp(1.75rem, 1.4rem + 1.4vw, 2.25rem)
--ggds-font-size-3xlclamp(2rem, 1.5rem + 2.2vw, 3rem)
--ggds-font-weight-regular400
--ggds-font-weight-bold700
--ggds-line-height-tight1.2
--ggds-line-height-body1.6
--ggds-measure68ch

Spacing

One spacing scale for padding, margins and gaps, in steps of 4px. Use the scale, not values in between, so pages line up and keep the same rhythm on every government website.

  • Use small steps (1 to 3) inside a component, 4 and 6 between related things, and 8 and above between sections.
  • Leave more space above a heading than below it, so it belongs to what follows.
Spacing tokens
SampleTokenValueUse
--ggds-space-10.25rem
--ggds-space-20.5rem
--ggds-space-30.75rem
--ggds-space-41rem
--ggds-space-61.5rem
--ggds-space-82rem
--ggds-space-123rem
--ggds-space-164rem

Layout

Pages are one column on phones, and gain columns only as the screen allows. Design for a 320px phone first.

  • ggds-container centres the page, up to 76rem wide, with a side margin (the gutter) that grows from 16px on phones to 32px on large screens, and keeps clear of a phone's notch.
  • ggds-main gives the main content its space above and below. Put it on <main id="main" tabindex="-1">, the skip link's target.
  • Use the three breakpoints only. Components change layout at them, and the tests reject any other width in GGDS's CSS.
  • To arrange your own content, use the layout classes: stacks, rows that wrap, grids and a side column, spaced with this scale. They need no CSS framework.
Layout tokens
TokenValueUse
--ggds-size-gutterclamp(1rem, 0.6rem + 2vw, 2rem)
--ggds-size-content-max76rem
--ggds-breakpoint-tablet48rem
--ggds-breakpoint-desktop64rem
--ggds-breakpoint-wide80remFrom this width the header shows its sections in one row beside the name.
--ggds-breakpoint-tall36remA height, not a width: from this height a pinned scroll scene stays on screen. Below it (a short screen or high zoom) the scene is an ordinary section, so nothing is cut off.

Sizes and touch targets

Everything people tap is at least 44px tall: buttons, links in menus, form fields, radios and checkboxes with their labels. That is more than WCAG 2.2 asks (24px), because many people use phones with one hand, on the move.

Size tokens
TokenValueUse
--ggds-size-target44pxMinimum touch target (exceeds WCAG 2.5.8 AA, 24px)
--ggds-size-icon-sm1rem
--ggds-size-icon-md1.25rem
--ggds-size-icon-lg1.5rem
--ggds-size-icon-xl2rem

Focus

When people use a keyboard, the element they are on has a 3px gold ring with a dark band around it, so it shows on light and dark backgrounds alike. Never remove it. In Windows contrast themes it uses the system's highlight colour.

Corners and shadows

Small rounded corners, and light shadows only where something sits above the page. Shadows never carry meaning: anything that must be seen also has a border.

Corner tokens
SampleTokenValueUse
--ggds-radius-sm4px
--ggds-radius-md8px
--ggds-radius-lg14px
--ggds-radius-pill999px
--ggds-radius-round50%
--ggds-radius-sheet18pxTop corners of a bottom sheet on phones.
Shadow tokens
SampleTokenValueUse
--ggds-shadow-10 1px 2px rgb(20 33 61 / 0.08), 0 1px 3px rgb(20 33 61 / 0.06)
--ggds-shadow-20 4px 12px rgb(20 33 61 / 0.1), 0 2px 4px rgb(20 33 61 / 0.06)
--ggds-shadow-sheet0 -8px 32px rgb(20 33 61 / 0.18)A bottom sheet over the page on phones.

Motion

Movement is short and explains a change, such as a menu opening. Nothing flashes. The only thing that moves on its own is the optional hero drawing, only for people who have not asked for less motion, and it stops within 5 seconds.

  • Animate only inside @media (prefers-reduced-motion: no-preference), so people who ask their device for less motion get none.
  • Use the duration and easing tokens, so movement feels the same everywhere.
  • Never make people wait for an animation before they can act.
  • Anything that moves on its own must stop within 5 seconds, or have a pause button (WCAG 2.2.2). A finite animation-iteration-count does it without JavaScript; never use infinite.
  • Movement can also follow the scroll: parts that rise into view, layers with depth, lines that draw themselves and scenes that tell a story, with the scroll effects. They follow the person's own scrolling, never take it over, and leave the page still and finished for anyone who asks for less motion.
  • Keep scroll effects to homepages, campaign and information pages. Never inside a service's steps: questions, check your answers, errors, payment and confirmation stay still.
Motion tokens
TokenValueUse
--ggds-motion-duration-fast120ms
--ggds-motion-duration-base220ms
--ggds-motion-duration-slow360ms
--ggds-motion-duration-stagger40msDelay between items that appear one after another.
--ggds-motion-easing-standard0.2,0,0,1
--ggds-motion-easing-enter0.16,1,0.3,1
--ggds-motion-easing-spring0.34,1.56,0.64,1A small overshoot: a pressed button springs back.

Layers

Named layers for things that sit above the page, so a menu never ends up behind a sticky header. GGDS's CSS uses these names only, never raw numbers.

Layer tokens
TokenValueUse
--ggds-layer-base0
--ggds-layer-raised10
--ggds-layer-sticky100
--ggds-layer-overlay400
--ggds-layer-modal500
--ggds-layer-toast600

Icons

GGDS has its own set of 143 line icons for government services, @ggds/icons, drawn on a 24px grid in the colour of the text around them. See all the icons, and how to use them with the icon component.

  • Always put words next to an icon. An icon on its own is guessed differently by different people.
  • Hide icons from screen readers (aria-hidden="true" and focusable="false"), because the words already say it.
  • Use the icon size tokens, and the text colour (currentColor), so icons keep their contrast in every theme.

Back to top

Something wrong, unclear or missing? Report a problem with this page. You need a GitHub account.