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

Get started as a developer

GGDS is plain HTML and CSS, so it works with whatever you build with: plain HTML, React and Next.js, Vue, Svelte, Angular, Astro, Django, WordPress, Laravel, or anything else that makes web pages. Try it in one minute below, then find your setup. New to GGDS? Start with the tutorial.

Try it in one minute

Copy this page, save it as index.html and open it in your browser. It loads GGDS from the jsDelivr CDN, so there is nothing to download or install, and it has every part a GGDS page needs: skip link, banner, header, content, footer and phone tab bar.

HTML
<!doctype html>
<html lang="en-GB">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Apply for a licence | Example Agency</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ggds/css@0.5.0/dist/ggds.min.css">
  <script type="module" src="https://cdn.jsdelivr.net/npm/@ggds/js@0.5.0/dist/auto.js"></script>
</head>
<body>
<a class="ggds-skip-link" href="#main">Skip to main content</a>
<section class="ggds-banner" aria-label="Official government website">
  <details class="ggds-banner__details ggds-container">
    <summary class="ggds-banner__summary">
      <svg class="ggds-banner__flag" viewBox="0 0 30 20" aria-hidden="true" focusable="false">
        <rect class="ggds-banner__flag-red" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-gold" y="6.67" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-green" y="13.33" width="30" height="6.67"/>
        <polygon class="ggds-banner__flag-star" points="15,6.8 15.73,8.99 18.04,9.01 16.19,10.39 16.88,12.59 15,11.25 13.12,12.59 13.81,10.39 11.96,9.01 14.27,8.99"/>
      </svg>
      <span class="ggds-banner__text">An official website of the Government of Ghana</span>
      <span class="ggds-banner__toggle">How to tell</span>
    </summary>
    <div class="ggds-banner__content">
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">Check the address</p>
        <p>The official address of this website is <strong>www.example.gov.gh</strong>. Most government websites end in <strong>.gov.gh</strong>, but some official websites do not. You can check it in the <a href="https://ghana-gds.github.io/ggds/register.html">register of official government websites</a>.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">A padlock is not proof</p>
        <p>A padlock or <strong>https://</strong> before the address means your connection to the website is private. It does not show who runs the website.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">We will never ask for your PIN</p>
        <p>Government officials will never ask for your PIN, password or mobile money code, by phone, by SMS or on a website.</p>
      </div>
    </div>
  </details>
</section>
<header class="ggds-header">
  <div class="ggds-container ggds-header__inner">
    <a class="ggds-header__identity" href="/">
      <span class="ggds-header__monogram" aria-hidden="true">EA</span>
      <span class="ggds-header__text">
        <span class="ggds-header__name">Example Agency</span>
        <span class="ggds-header__country">Republic of Ghana</span>
        <span class="ggds-visually-hidden"> – home</span>
      </span>
    </a>
    <nav class="ggds-header__nav" id="ggds-header-nav" aria-label="Main">
      <ul class="ggds-header__list">
        <li><a class="ggds-header__link" href="/services/" aria-current="page">Services</a></li>
        <li><a class="ggds-header__link" href="/regulation/">Laws &amp; regulations</a></li>
        <li><a class="ggds-header__link" href="/news-notices/">News &amp; notices</a></li>
        <li><a class="ggds-header__link" href="/about/">About &amp; contact</a></li>
      </ul>
    </nav>
    <a class="ggds-header__search" href="/search/"><svg class="ggds-header__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg><span class="ggds-header__search-label">Search</span></a>
    <button type="button" class="ggds-header__menu-button" aria-controls="ggds-header-nav" aria-expanded="false" hidden><svg class="ggds-header__icon ggds-header__icon--menu" 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="M4 6h16M4 12h16M4 18h16"/></svg><svg class="ggds-header__icon ggds-header__icon--close" 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="M6 6l12 12M18 6 6 18"/></svg><span class="ggds-visually-hidden">Menu</span></button>
  </div>
</header>
<main class="ggds-main ggds-container" id="main" tabindex="-1">
  <nav class="ggds-breadcrumbs" aria-label="Breadcrumb">
    <ol class="ggds-breadcrumbs__list">
      <li class="ggds-breadcrumbs__item"><a class="ggds-breadcrumbs__link" href="/">Home</a></li>
      <li class="ggds-breadcrumbs__item"><a class="ggds-breadcrumbs__link" href="/services/">Services</a></li>
      <li class="ggds-breadcrumbs__item" aria-current="page">Apply for a licence</li>
    </ol>
  </nav>
  <h1>Apply for a licence</h1>
  <p class="ggds-lead ggds-measure">Find out who needs a licence, what it costs and how to apply online.</p>
  <div class="ggds-prose">
    <h2>Before you start</h2>
    <p>You will need your Ghana Card number and your business registration certificate.</p>
  </div>
  <p><a class="ggds-button" href="/services/licence/apply/">Start now</a></p>
</main>
<footer class="ggds-footer">
  <div class="ggds-container ggds-footer__main">
    <div>
      <p class="ggds-footer__identity"><span class="ggds-header__monogram" aria-hidden="true">EA</span><span>Example Agency</span></p>
      <p class="ggds-footer__purpose">We license telecommunications and broadcasting services and protect consumers.</p>
      <address class="ggds-footer__contact">
        <span>1 Example Road, Accra, Ghana · GA-000-0000</span>
        <a href="mailto:info@example.gov.gh">info@example.gov.gh</a>
        <span>General enquiries: +233 30 000 0000</span>
      </address>
      <p class="ggds-footer__more"><a href="/about/contact/">All contact details and offices</a></p>
    </div>
    <div class="ggds-footer__sections">
      <nav class="ggds-footer__section" aria-label="Services">
        <p class="ggds-footer__heading"><a href="/services/">Services</a></p>
        <ul class="ggds-footer__list">
          <li><a href="/services/">Find a service</a></li>
          <li><a href="/services/fees/">Fees and charges</a></li>
          <li><a href="/services/portals/">Application portals</a></li>
        </ul>
      </nav>
      <nav class="ggds-footer__section" aria-label="Laws &amp; regulations">
        <p class="ggds-footer__heading"><a href="/regulation/">Laws &amp; regulations</a></p>
        <ul class="ggds-footer__list">
          <li><a href="/regulation/?type=act">Laws &amp; regulations</a></li>
          <li><a href="/regulation/consultations/">Public consultations</a></li>
        </ul>
      </nav>
      <nav class="ggds-footer__section" aria-label="About &amp; contact">
        <p class="ggds-footer__heading"><a href="/about/">About &amp; contact</a></p>
        <ul class="ggds-footer__list">
          <li><a href="/about/contact/">Contact us</a></li>
          <li><a href="/about/contact/#offices">Offices</a></li>
        </ul>
      </nav>
    </div>
  </div>
  <div class="ggds-footer__bottom">
    <ul class="ggds-container ggds-footer__bar">
      <li>© 2026 Example Agency</li>
      <li><a href="/accessibility/">Accessibility</a></li>
      <li><a href="/privacy/">Privacy</a></li>
      <li><a href="/disclaimer/">Disclaimer</a></li>
      <li><a href="/sitemap/">Sitemap</a></li>
    </ul>
  </div>
</footer>
<nav class="ggds-tab-bar" aria-label="Quick links">
  <ul class="ggds-tab-bar__list">
    <li><a class="ggds-tab-bar__link" href="/"><svg class="ggds-tab-bar__icon" 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="M3 11.5 12 4l9 7.5"/><path d="M5.5 9.5V20h13V9.5"/></svg><span>Home</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/services/" aria-current="page"><svg class="ggds-tab-bar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M8 9h8M8 13h8M8 17h5"/></svg><span>Services</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/consumer-help/complaints/"><svg class="ggds-tab-bar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="8.5"/><path d="M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14"/><path d="M12 17h.01"/></svg><span>Complaints</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/regulation/"><svg class="ggds-tab-bar__icon" 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 4v16M7 20h10M5 8h14"/><path d="m5 8-2.5 6a2.5 2.5 0 0 0 5 0z"/><path d="m19 8-2.5 6a2.5 2.5 0 0 0 5 0z"/></svg><span>Laws</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/search/"><svg class="ggds-tab-bar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg><span>Search</span></a></li>
  </ul>
</nav>
</body>
</html>

Change the name, sections and content to your own, then add more parts from Components: each one has the HTML to copy. Before the website goes live, serve the files yourself.

Where to get GGDS

  • npm

    @ggds/css, js, themes, icons, react, astro and tokens, for projects with a build step.

  • PyPI

    ggds-django: template tags, forms and Django admin, for Django and Wagtail.

  • GitHub releases

    The ggds folder as a zip, for any website, and the WordPress theme. Version 0.5.0.

  • GitHub repository

    The source code, problems people have reported, and how to contribute.

Step 1: Find your setup

Choose what your website is built with. Plain HTML websites follow steps 2 to 4 below; every framework has its own short section, with the same steps in its own words.

Framework logos are trademarks of their owners, shown to say GGDS works with them; they are not part of GGDS. Shapes from Simple Icons. Angular logo: Google, CC BY 4.0. Vue logo: Evan You, CC BY-NC-SA 4.0.

Just trying GGDS out? Use the CDN, or the one-minute page above.

Step 2: Add the files

From a CDN (quickest)

Put these two lines in the <head> of each page. Nothing else is needed.

HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ggds/css@0.5.0/dist/ggds.min.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@ggds/js@0.5.0/dist/auto.js"></script>

Keep the exact version (@0.5.0) so your pages do not change when GGDS does. The CDN is for trying GGDS out and for prototypes. For a live government website, use the download or npm: then the website does not depend on another company’s service, and a strict Content Security Policy works without allowing another address.

If you do keep the CDN on a live website, add integrity and crossorigin="anonymous" to both lines, so the browser refuses a file that has been changed. The values for version 0.5.0 are in integrity.json, in the same release as the download: use the entries for ggds.min.css and auto.js.

From the download (recommended for live websites)

Download ggds-0.5.0.zip from the latest GitHub release. You do not need Node, npm or any build tools. The zip holds one ggds folder: copy it into your website as it is, then put these two lines in the <head> of each page:

HTML
<link rel="stylesheet" href="ggds/ggds.min.css">
<script type="module" src="ggds/auto.js"></script>
The files in the ggds folder
FileWhat it isNeeded?
ggds.min.cssAll the styles, with the default theme. ggds.css is the same, readableYes
themes/<theme>.cssYour institution's themeOnly for a theme other than the default
auto.js and the other .js filesThe small script: the phone menu, error summary, character count, password Show button, dialogs and timeout warningNo. Every part works without it, except a dialog or timeout warning. Keep the .js files together
core.min.css and components/The same styles in parts, to load only what you useNo

The files come from your own website, so a strict Content Security Policy (style-src 'self'; script-src 'self') works without changes. The zip's SHA256SUMS file lets you check the download.

From npm

The packages are in the @ggds organisation on npm, at version 0.5.0, with provenance.

Terminal
npm install @ggds/css @ggds/js
npm install @ggds/themes   # for an institution theme
The GGDS packages
PackageWhat it is
@ggds/cssAll the styles: ggds.css, or core.css and one file per component
@ggds/themesThe institution themes, one small file each
@ggds/jsThe optional script: phone menu, error summary, character count, password Show button, dialogs and timeout warning
@ggds/tokensThe design tokens as CSS custom properties and JSON, and the theme colour checker
@ggds/reactPage parts and form fields as React components, for React and Next.js
@ggds/astroThe page parts as Astro components
@ggds/icons143 icons as SVG files, a sprite, JavaScript and JSON

Load everything, or only the components you use, which keeps pages lighter:

CSS
@import "@ggds/css/ggds.css";              /* everything */

/* or only what you use: */
@import "@ggds/css/core.css";              /* tokens and base styles */
@import "@ggds/css/components/header.css"; /* then one file per component */
@import "@ggds/css/components/footer.css";

Start the optional script once, in your own script file:

JavaScript
import { initAll } from '@ggds/js';
initAll();

// or, to start it on every page without writing code:
import '@ggds/js/auto';

Without a bundler, copy the files you need from node_modules/@ggds/css/dist/, node_modules/@ggds/themes/dist/ and node_modules/@ggds/js/dist/ into your website’s static files.

Until version 1.0, a new minor version can change components. Keep to one minor version ("@ggds/css": "~0.5.0"), and read What’s new before you update.

Before the website goes live, follow Fast pages: caching, compression and loading only the components the website uses. Then run npx @ggds/check https://your-address.gov.gh to see what it still needs: page parts, accessibility, security headers, email domain and speed.

Step 3: Start from a complete page

A page with every required part: skip link, banner, header, content, footer and phone tab bar. It is the page from Try it in one minute, loading the files from the download’s ggds folder. Change the name, sections and content to your own.

HTML
<!doctype html>
<html lang="en-GB">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Apply for a licence | Example Agency</title>
  <link rel="stylesheet" href="ggds/ggds.min.css">
  <script type="module" src="ggds/auto.js"></script>
</head>
<body>
<a class="ggds-skip-link" href="#main">Skip to main content</a>
<section class="ggds-banner" aria-label="Official government website">
  <details class="ggds-banner__details ggds-container">
    <summary class="ggds-banner__summary">
      <svg class="ggds-banner__flag" viewBox="0 0 30 20" aria-hidden="true" focusable="false">
        <rect class="ggds-banner__flag-red" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-gold" y="6.67" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-green" y="13.33" width="30" height="6.67"/>
        <polygon class="ggds-banner__flag-star" points="15,6.8 15.73,8.99 18.04,9.01 16.19,10.39 16.88,12.59 15,11.25 13.12,12.59 13.81,10.39 11.96,9.01 14.27,8.99"/>
      </svg>
      <span class="ggds-banner__text">An official website of the Government of Ghana</span>
      <span class="ggds-banner__toggle">How to tell</span>
    </summary>
    <div class="ggds-banner__content">
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">Check the address</p>
        <p>The official address of this website is <strong>www.example.gov.gh</strong>. Most government websites end in <strong>.gov.gh</strong>, but some official websites do not. You can check it in the <a href="https://ghana-gds.github.io/ggds/register.html">register of official government websites</a>.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">A padlock is not proof</p>
        <p>A padlock or <strong>https://</strong> before the address means your connection to the website is private. It does not show who runs the website.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">We will never ask for your PIN</p>
        <p>Government officials will never ask for your PIN, password or mobile money code, by phone, by SMS or on a website.</p>
      </div>
    </div>
  </details>
</section>
<header class="ggds-header">
  <div class="ggds-container ggds-header__inner">
    <a class="ggds-header__identity" href="/">
      <span class="ggds-header__monogram" aria-hidden="true">EA</span>
      <span class="ggds-header__text">
        <span class="ggds-header__name">Example Agency</span>
        <span class="ggds-header__country">Republic of Ghana</span>
        <span class="ggds-visually-hidden"> – home</span>
      </span>
    </a>
    <nav class="ggds-header__nav" id="ggds-header-nav" aria-label="Main">
      <ul class="ggds-header__list">
        <li><a class="ggds-header__link" href="/services/" aria-current="page">Services</a></li>
        <li><a class="ggds-header__link" href="/regulation/">Laws &amp; regulations</a></li>
        <li><a class="ggds-header__link" href="/news-notices/">News &amp; notices</a></li>
        <li><a class="ggds-header__link" href="/about/">About &amp; contact</a></li>
      </ul>
    </nav>
    <a class="ggds-header__search" href="/search/"><svg class="ggds-header__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg><span class="ggds-header__search-label">Search</span></a>
    <button type="button" class="ggds-header__menu-button" aria-controls="ggds-header-nav" aria-expanded="false" hidden><svg class="ggds-header__icon ggds-header__icon--menu" 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="M4 6h16M4 12h16M4 18h16"/></svg><svg class="ggds-header__icon ggds-header__icon--close" 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="M6 6l12 12M18 6 6 18"/></svg><span class="ggds-visually-hidden">Menu</span></button>
  </div>
</header>
<main class="ggds-main ggds-container" id="main" tabindex="-1">
  <nav class="ggds-breadcrumbs" aria-label="Breadcrumb">
    <ol class="ggds-breadcrumbs__list">
      <li class="ggds-breadcrumbs__item"><a class="ggds-breadcrumbs__link" href="/">Home</a></li>
      <li class="ggds-breadcrumbs__item"><a class="ggds-breadcrumbs__link" href="/services/">Services</a></li>
      <li class="ggds-breadcrumbs__item" aria-current="page">Apply for a licence</li>
    </ol>
  </nav>
  <h1>Apply for a licence</h1>
  <p class="ggds-lead ggds-measure">Find out who needs a licence, what it costs and how to apply online.</p>
  <div class="ggds-prose">
    <h2>Before you start</h2>
    <p>You will need your Ghana Card number and your business registration certificate.</p>
  </div>
  <p><a class="ggds-button" href="/services/licence/apply/">Start now</a></p>
</main>
<footer class="ggds-footer">
  <div class="ggds-container ggds-footer__main">
    <div>
      <p class="ggds-footer__identity"><span class="ggds-header__monogram" aria-hidden="true">EA</span><span>Example Agency</span></p>
      <p class="ggds-footer__purpose">We license telecommunications and broadcasting services and protect consumers.</p>
      <address class="ggds-footer__contact">
        <span>1 Example Road, Accra, Ghana · GA-000-0000</span>
        <a href="mailto:info@example.gov.gh">info@example.gov.gh</a>
        <span>General enquiries: +233 30 000 0000</span>
      </address>
      <p class="ggds-footer__more"><a href="/about/contact/">All contact details and offices</a></p>
    </div>
    <div class="ggds-footer__sections">
      <nav class="ggds-footer__section" aria-label="Services">
        <p class="ggds-footer__heading"><a href="/services/">Services</a></p>
        <ul class="ggds-footer__list">
          <li><a href="/services/">Find a service</a></li>
          <li><a href="/services/fees/">Fees and charges</a></li>
          <li><a href="/services/portals/">Application portals</a></li>
        </ul>
      </nav>
      <nav class="ggds-footer__section" aria-label="Laws &amp; regulations">
        <p class="ggds-footer__heading"><a href="/regulation/">Laws &amp; regulations</a></p>
        <ul class="ggds-footer__list">
          <li><a href="/regulation/?type=act">Laws &amp; regulations</a></li>
          <li><a href="/regulation/consultations/">Public consultations</a></li>
        </ul>
      </nav>
      <nav class="ggds-footer__section" aria-label="About &amp; contact">
        <p class="ggds-footer__heading"><a href="/about/">About &amp; contact</a></p>
        <ul class="ggds-footer__list">
          <li><a href="/about/contact/">Contact us</a></li>
          <li><a href="/about/contact/#offices">Offices</a></li>
        </ul>
      </nav>
    </div>
  </div>
  <div class="ggds-footer__bottom">
    <ul class="ggds-container ggds-footer__bar">
      <li>© 2026 Example Agency</li>
      <li><a href="/accessibility/">Accessibility</a></li>
      <li><a href="/privacy/">Privacy</a></li>
      <li><a href="/disclaimer/">Disclaimer</a></li>
      <li><a href="/sitemap/">Sitemap</a></li>
    </ul>
  </div>
</footer>
<nav class="ggds-tab-bar" aria-label="Quick links">
  <ul class="ggds-tab-bar__list">
    <li><a class="ggds-tab-bar__link" href="/"><svg class="ggds-tab-bar__icon" 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="M3 11.5 12 4l9 7.5"/><path d="M5.5 9.5V20h13V9.5"/></svg><span>Home</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/services/" aria-current="page"><svg class="ggds-tab-bar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M8 9h8M8 13h8M8 17h5"/></svg><span>Services</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/consumer-help/complaints/"><svg class="ggds-tab-bar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="8.5"/><path d="M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14"/><path d="M12 17h.01"/></svg><span>Complaints</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/regulation/"><svg class="ggds-tab-bar__icon" 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 4v16M7 20h10M5 8h14"/><path d="m5 8-2.5 6a2.5 2.5 0 0 0 5 0z"/><path d="m19 8-2.5 6a2.5 2.5 0 0 0 5 0z"/></svg><span>Laws</span></a></li>
    <li><a class="ggds-tab-bar__link" href="/search/"><svg class="ggds-tab-bar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg><span>Search</span></a></li>
  </ul>
</nav>
</body>
</html>

Using the CDN? Keep the two CDN lines in place of the two ggds/ lines. Using npm? Load the files the way your build tool does, as in From npm.

Step 4: Add your theme

Keep the default, or add your institution’s theme straight after the GGDS stylesheet. Find its name on Themes, or make one from your own colour. Use the line for the way you added GGDS:

HTML
<!-- CDN -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ggds/themes@0.5.0/dist/<theme>.css">

<!-- Download -->
<link rel="stylesheet" href="ggds/themes/<theme>.css">

/* npm: last in your stylesheet */
@import "@ggds/themes/<theme>.css";

Replace <theme> with your theme’s name, for example csa.

Set it up in your framework

Every framework needs the same three things: the GGDS stylesheet, your theme if you have one, and the small script for the phone menu and the error summary. Here is where each goes. The component pages have the HTML for every part, and a JSX version for React.

Starting a new website? npx @ggds/create --stack next, --stack astro or --stack django makes a whole government website in that framework, with GGDS set up as below: a homepage, services, forms, search and the required pages, from your institution's details. The website builder makes the same projects. Every page comes from the framework's Page component, so a newer GGDS updates the parts around it.

React (with Vite)

@ggds/react has the page parts and form fields as components: Header, Footer, TextInput, Radios, ErrorSummary and more. They write the HTML GGDS tests, with labels, hints and errors wired up for screen readers, and the menu and error summary work inside React, so you do not need @ggds/js.

Terminal
npm install @ggds/react @ggds/css
JSX (React)
import '@ggds/css/ggds.css';
// import '@ggds/themes/nca.css';   // your theme, after GGDS (npm install @ggds/themes)
import { createRoot } from 'react-dom/client';
import App from './App.jsx';

createRoot(document.getElementById('root')).render(<App />);
JSX (React)
import { ErrorSummary, TextInput, Button } from '@ggds/react';

export default function Apply({ errors = {} }) {
  return (
    <main className="ggds-main ggds-container" id="main" tabIndex={-1}>
      <ErrorSummary errors={errors.fullName ? [{ href: '#fullName', text: errors.fullName }] : []} />
      <h1>Apply for a permit</h1>
      <form method="post" noValidate>
        <TextInput id="fullName" name="fullName" label="Full name" hint="As shown on your Ghana Card"
          width="long" autoComplete="name" error={errors.fullName} />
        <Button type="submit">Continue</Button>
      </form>
    </main>
  );
}

For parts without a component, switch the code on any component page to JSX (React) and copy it. See a form built with @ggds/react: send it empty to see the errors.

Next.js

Install as for React. Load the styles once, in the root layout, and put the page parts around every page. Only Header and ErrorSummary run in the browser; the other components are server components.

TSX (React)
import '@ggds/css/ggds.css';
import { SkipLink, Banner, Footer } from '@ggds/react';
import { SiteHeader } from './site-header';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en-GB">
      <body>
        <SkipLink />
        <Banner shortName="Example Agency" host="www.example.gov.gh" official />
        <SiteHeader />
        <main className="ggds-main ggds-container" id="main" tabIndex={-1}>{children}</main>
        <Footer name="Example Agency" bar={[{ label: 'Privacy', href: '/privacy/' }]} />
      </body>
    </html>
  );
}

The header marks the section people are in, so it needs the current address. Give it its own small client component:

TSX (React)
'use client';
import { usePathname } from 'next/navigation';
import { Header } from '@ggds/react';

const nav = [{ label: 'Services', href: '/services/' }, { label: 'About', href: '/about/' }];

export function SiteHeader() {
  const path = usePathname();
  return <Header name="Example Agency" initials="EA" nav={nav} current={nav.find((n) => path.startsWith(n.href))?.href} />;
}

Vue and Nuxt

Vue templates are HTML, so the HTML on the component pages pastes in as it is: class and for work. Install the styles and the script:

Terminal
npm install @ggds/css @ggds/js
JavaScript
import '@ggds/css/ggds.css';
import { createApp } from 'vue';
import { initAll } from '@ggds/js';
import App from './App.vue';
import router from './router';

createApp(App).use(router).mount('#app');
router.afterEach(() => setTimeout(initAll)); // after each page change; safe to run more than once

With Nuxt, add the stylesheet in nuxt.config.ts and start the script in a plugin:

TypeScript
export default defineNuxtConfig({
  css: ['@ggds/css/ggds.css'],
  app: { head: { htmlAttrs: { lang: 'en-GB' } } },
});
TypeScript
import { initAll } from '@ggds/js';

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.hook('app:mounted', () => initAll());
  nuxtApp.hook('page:finish', () => initAll());
});

Svelte and SvelteKit

Svelte components are HTML too: paste the GGDS HTML in as it is. In SvelteKit, load the styles and start the script in the root layout:

Terminal
npm install @ggds/css @ggds/js
Svelte
<script>
  import '@ggds/css/ggds.css';
  import { afterNavigate } from '$app/navigation';
  import { initAll } from '@ggds/js';

  let { children } = $props();
  afterNavigate(() => initAll()); // on the first page and after each page change
</script>

{@render children()}

Set <html lang="en-GB"> in src/app.html.

Angular

Angular templates take the GGDS HTML as it is. Add the stylesheet to the build and start the script once the app has drawn:

Terminal
npm install @ggds/css @ggds/js
JSON
"styles": [
  "node_modules/@ggds/css/dist/ggds.css",
  "src/styles.css"
]
TypeScript
import { AfterViewInit, Component, inject } from '@angular/core';
import { NavigationEnd, Router, RouterOutlet } from '@angular/router';
import { initAll } from '@ggds/js';

@Component({ selector: 'app-root', imports: [RouterOutlet], templateUrl: './app.component.html' })
export class AppComponent implements AfterViewInit {
  private router = inject(Router);

  ngAfterViewInit() {
    initAll();
    this.router.events.subscribe((e) => { if (e instanceof NavigationEnd) setTimeout(initAll); });
  }
}

Astro

npm install @ggds/astro @ggds/css, from npm. It has the page parts as Astro components, with the same HTML as these pages: SkipLink, Banner, Header, Hero, Footer and TabBar. Import @ggds/css/ggds.css in your layout and @ggds/js/auto in a <script>.

Astro
---
import '@ggds/css/ggds.css';
import Header from '@ggds/astro/Header.astro';
---
<Header name="Example Agency" initials="EA"
  nav={[{ label: 'Services', href: '/services/' }]} current={Astro.url.pathname} />
<script>import '@ggds/js/auto';</script>

Django and Wagtail

pip install ggds-django, from PyPI. It works with Wagtail and other Django-based content management systems.

Python
INSTALLED_APPS = [..., "django.contrib.staticfiles", "ggds_django"]
FORM_RENDERER = "ggds_django.forms.GGDSFormRenderer"

Then {{ form }} renders every form in GGDS markup, with an error summary and each field's error wired up for screen readers. The page parts are template tags, and {% ggds_assets %} loads the styles, your theme and the script:

Django template
{% load ggds %}
{% ggds_assets theme="nca" %}
{% ggds_banner short_name="EA" host="example.gov.gh" official=True %}
{% ggds_header name="Example Agency" nav=nav %}
{% ggds_pagination page_obj %}
{% ggds_footer name="Example Agency" sections=sections links=links %}

For Django admin in GGDS colours with your institution's header, add "ggds_django.admin_theme" above "django.contrib.admin" and set GGDS_ADMIN = {"theme": "nca", "name": "Example Agency"}. Every tag is in the README.

WordPress

Download ggds-wordpress-0.5.0.zip from the latest GitHub release, then in WordPress go to Appearance > Themes > Add New Theme > Upload Theme. It is a classic theme that outputs the GGDS HTML.

  • Set your institution's short name, theme, official address and contact details in Appearance > Customise > GGDS, and your logo in Site identity.
  • Make four menus: main sections, common tasks, footer sections and footer links.
  • Its front end has no inline scripts or styles, so you can serve it with a strict Content Security Policy. Every template is tested with axe in a real WordPress.

Already have a WordPress website? GGDS Switch, a plugin, turns it into a GGDS website: your pages, menus and logo come with you, page-builder layouts become plain, accessible pages, and you can undo it. Everything is on GGDS for WordPress.

Laravel, PHP, Rails, .NET, Go and other server-rendered websites

Anything that sends HTML pages can use GGDS: write the GGDS HTML in your templates. Add the files one of two ways.

Without build tools: copy the ggds folder from the download into your public folder (public/ in Laravel and Rails, wwwroot/ in .NET) and put these lines in your layout's <head>:

HTML
<link rel="stylesheet" href="/ggds/ggds.min.css">
<link rel="stylesheet" href="/ggds/themes/nca.css">   <!-- your theme, if you have one -->
<script type="module" src="/ggds/auto.js"></script>

With Vite, as Laravel uses: npm install @ggds/css @ggds/js, then

CSS
@import "@ggds/css/ggds.css";
@import "@ggds/themes/nca.css";   /* your theme: npm install @ggds/themes */
JavaScript
import '@ggds/js/auto';

Your framework's form helpers can write GGDS fields: give each its ggds-* classes, and when there is an error, the message, aria-invalid and aria-describedby as on the text input page, and the error summary at the top of the page.

Anything else

If your tool makes web pages, GGDS works with it. Load ggds.css (and your theme), use the HTML from the component pages, and load auto.js, or call initAll() from @ggds/js after the page or a new part of it appears. Every part works without the script; it only adds the phone menu and moves focus to the error summary.

Languages

GGDS writes some text itself: "Skip to main content", the banner, "Menu", "There is a problem", "Error:" and the like. All of it is in one list, packages/html/strings/en.json, so it can be translated once and used by every package. A text with no translation yet is shown in English.

Translations are written by people who speak the language, never by a machine alone. The names of the languages below, and every translation, are marked as needing a speaker until one has checked them.

GGDS's own text in each language
LanguageIts own nameCodeTexts translatedChecked
EnglishEnglishen100 of 100Checked by a speaker
TwiTwitw0 of 100Needs a speaker
EweEʋegbeee0 of 100Needs a speaker
GaGãgaa0 of 100Needs a speaker
HausaHausaha0 of 100Needs a speaker
DagbaniDagbanlidag0 of 100Needs a speaker

Django

ggds-django comes with a gettext catalogue for each language. Turn on Django's translation and the GGDS parts follow the request's language:

Python
LANGUAGES = [("en", "English"), ("tw", "Twi"), ("ee", "Ewe")]
MIDDLEWARE = [..., "django.middleware.locale.LocaleMiddleware", ...]
# urls.py: urlpatterns = i18n_patterns(...), so /tw/... is the Twi page

{% ggds_language_switcher %}   {# every language in LANGUAGES, linked to this page #}

React and Next.js

JavaScript
import { Header, LanguageSwitcher, stringsFor } from '@ggds/react';

const strings = stringsFor(lang);   // English wherever a language has no translation yet
<LanguageSwitcher languages={[{ code: 'en', href: '/' }, { code: 'tw', href: '/tw/' }]} current={lang} strings={strings} />
<Header name="Example Agency" nav={nav} strings={strings} />

Astro

Astro
---
import Header from '@ggds/astro/Header.astro';
import { stringsFor } from '@ggds/astro/strings.mjs';
const strings = stringsFor(Astro.currentLocale ?? 'en');
---
<Header name="Example Agency" nav={nav} strings={strings} />

HTML, WordPress and other websites

The text is in the HTML you copy: translate it there, and set <html lang> to the page's language. The character count's words are attributes on the field (data-ggds-remaining-other and the others).

Translate GGDS

Each language has its own file, such as packages/html/strings/tw.json, with the same keys as en.json. Keep every {placeholder}: the build stops if a translation loses one. See Translations in the contributing guide.

Next steps

  • Pick the parts you need from Components. Each page says when to use it and has the HTML to copy.
  • See what you can build in the showcase: services, accounts, open data, warnings, staff tools and phone-first pages, in any theme.
  • Check what changed in What’s new.

Back to top

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