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

Page structure

Layout

Classes that arrange content on a page: stacks, rows that wrap, grids and a side column, with the GGDS spacing, text sizes and colours.

When to use

  • To arrange your own content between GGDS components: a list of services beside filters, a row of buttons, the parts of a card you made yourself.
  • Instead of writing your own spacing and grid CSS, or adding a CSS framework, so pages keep the same rhythm on every government website.

When not to use

  • To change how a GGDS component looks. Components already have their spacing; if one does not fit your page, tell us.
  • For a set of links to similar pages. Use cards in a ggds-card-grid.
  • To show different information on phones and computers. Hide only what is shown another way on that screen.

How to use

  • Stack (ggds-stack): put it on the element around things that go one above the other. It removes their own margins and puts the same space between each, so you do not set a margin on every paragraph.
  • Cluster (ggds-cluster): for buttons, tags and links side by side. They wrap onto the next line on a phone. Add ggds-cluster--spread for a title on one side and an action on the other.
  • Grid: ggds-grid fits as many columns of at least 16rem as the screen allows, with no breakpoints to choose. When you need a set number, use ggds-grid--2, --3 or --4: always one column on phones.
  • Scroll row: ggds-scroll-row on a grid of cards turns it, on phones, into a row people swipe through sideways, so a long set does not make the page long. Each card snaps into place and the next one peeks in. Use it for sets people browse, such as examples, stories or related links, never for steps or anything people must read in order. If the cards hold no links, give the row tabindex="0" and an aria-label, so keyboard users can scroll it.
  • Side column: ggds-with-aside puts the main content and a 20rem column side by side from desktops, and one under the other before. Add ggds-sticky to the side column to keep it in view while the page scrolls.
  • Gaps: change the space in a stack, cluster or grid with ggds-gap-1 to ggds-gap-12, steps of the spacing scale. Use small steps inside a box, 4 and 6 between related things, and 8 and above between sections.
  • Text, surfaces and sizes: the text classes use the type scale and the two GGDS weights; the surface and border classes use the GGDS colours, so they keep their contrast in every theme.
  • The layout classes sit in their own cascade layer, ggds.utilities, after the components. A layout class on a component wins over the component's own spacing, and your own CSS still wins over GGDS without !important. If you name the layers yourself, keep the order ggds.base, ggds.components, ggds.utilities.
  • If you load GGDS one file at a time, add components/layout.css.

Accessibility

What GGDS does

  • Every layout is one column on a 320px phone and gains columns only as the screen allows, so the page never scrolls sideways, also with a wide font. Only a scroll row moves sideways, inside itself.
  • The layout classes change only where things appear on the screen, never the order a screen reader or the keyboard follows.
  • ggds-text-muted and the surfaces keep text at 4.5 to 1 contrast or more.

What you need to do

  • Write the HTML in the order people should read it. A side column comes after the main content in the HTML.
  • Do not hide information on a screen size with ggds-from-tablet, ggds-from-desktop or ggds-below-desktop unless it is shown another way on that screen.
  • Use ggds-target or ggds-target-square on anything people tap that is not a GGDS button, link list or field, so it is at least 44px.
  • Do not make body text smaller than ggds-text-base; keep ggds-text-sm and ggds-text-xs for short labels and notes.

Example: Main content with a side column

Open this example on its own page

HTML code for “Main content with a side column”
HTML
<div class="ggds-with-aside" data-test="with-aside">
  <div class="ggds-stack">
    <h2>Apply for a broadcasting licence</h2>
    <p>You need a licence to broadcast on radio or television in Ghana.</p>
    <p class="ggds-text-muted ggds-text-sm">Last updated 3 November 2026</p>
    <div class="ggds-cluster">
      <a class="ggds-button" href="#apply">Start now</a>
      <a href="#fees">See the fees</a>
    </div>
  </div>
  <aside class="ggds-sticky ggds-surface-sunken ggds-rounded ggds-pad-4" aria-labelledby="related-heading">
    <div class="ggds-stack ggds-gap-2">
      <h2 class="ggds-text-lg" id="related-heading">Related</h2>
      <a href="#renew">Renew a licence</a>
      <a href="#transfer">Transfer a licence</a>
    </div>
  </aside>
</div>
JSX (React)
<div className="ggds-with-aside" data-test="with-aside">
  <div className="ggds-stack">
    <h2>Apply for a broadcasting licence</h2>
    <p>You need a licence to broadcast on radio or television in Ghana.</p>
    <p className="ggds-text-muted ggds-text-sm">Last updated 3 November 2026</p>
    <div className="ggds-cluster">
      <a className="ggds-button" href="#apply">Start now</a>
      <a href="#fees">See the fees</a>
    </div>
  </div>
  <aside className="ggds-sticky ggds-surface-sunken ggds-rounded ggds-pad-4" aria-labelledby="related-heading">
    <div className="ggds-stack ggds-gap-2">
      <h2 className="ggds-text-lg" id="related-heading">Related</h2>
      <a href="#renew">Renew a licence</a>
      <a href="#transfer">Transfer a licence</a>
    </div>
  </aside>
</div>

Example: A grid with a set number of columns

Open this example on its own page

HTML code for “A grid with a set number of columns”
HTML
<ul class="ggds-grid ggds-grid--3 ggds-flush ggds-pad-0" data-test="grid-3" role="list">
  <li class="ggds-stack ggds-gap-2 ggds-border ggds-rounded ggds-pad-4">
    <p class="ggds-text-sm ggds-text-muted">Licences issued this year</p>
    <p class="ggds-text-2xl ggds-text-bold ggds-text-tight">1,284</p>
  </li>
  <li class="ggds-stack ggds-gap-2 ggds-border ggds-rounded ggds-pad-4">
    <p class="ggds-text-sm ggds-text-muted">Complaints resolved</p>
    <p class="ggds-text-2xl ggds-text-bold ggds-text-tight">92%</p>
  </li>
  <li class="ggds-stack ggds-gap-2 ggds-border ggds-rounded ggds-pad-4">
    <p class="ggds-text-sm ggds-text-muted">Average days to decide</p>
    <p class="ggds-text-2xl ggds-text-bold ggds-text-tight">14</p>
  </li>
</ul>
JSX (React)
<ul className="ggds-grid ggds-grid--3 ggds-flush ggds-pad-0" data-test="grid-3" role="list">
  <li className="ggds-stack ggds-gap-2 ggds-border ggds-rounded ggds-pad-4">
    <p className="ggds-text-sm ggds-text-muted">Licences issued this year</p>
    <p className="ggds-text-2xl ggds-text-bold ggds-text-tight">1,284</p>
  </li>
  <li className="ggds-stack ggds-gap-2 ggds-border ggds-rounded ggds-pad-4">
    <p className="ggds-text-sm ggds-text-muted">Complaints resolved</p>
    <p className="ggds-text-2xl ggds-text-bold ggds-text-tight">92%</p>
  </li>
  <li className="ggds-stack ggds-gap-2 ggds-border ggds-rounded ggds-pad-4">
    <p className="ggds-text-sm ggds-text-muted">Average days to decide</p>
    <p className="ggds-text-2xl ggds-text-bold ggds-text-tight">14</p>
  </li>
</ul>

Example: A row that wraps, spread to both ends

Open this example on its own page

HTML code for “A row that wraps, spread to both ends”
HTML
<div class="ggds-stack">
  <div class="ggds-cluster ggds-cluster--spread ggds-border-bottom">
    <h2 class="ggds-flush">Notices</h2>
    <a href="#all-notices">All notices</a>
  </div>
  <div class="ggds-cluster ggds-gap-2" data-test="cluster">
    <strong class="ggds-tag">Spectrum</strong>
    <strong class="ggds-tag">Consumer</strong>
    <strong class="ggds-tag">Broadcasting</strong>
    <span class="ggds-text-sm ggds-text-muted ggds-nowrap">12 November 2026</span>
  </div>
</div>
JSX (React)
<div className="ggds-stack">
  <div className="ggds-cluster ggds-cluster--spread ggds-border-bottom">
    <h2 className="ggds-flush">Notices</h2>
    <a href="#all-notices">All notices</a>
  </div>
  <div className="ggds-cluster ggds-gap-2" data-test="cluster">
    <strong className="ggds-tag">Spectrum</strong>
    <strong className="ggds-tag">Consumer</strong>
    <strong className="ggds-tag">Broadcasting</strong>
    <span className="ggds-text-sm ggds-text-muted ggds-nowrap">12 November 2026</span>
  </div>
</div>

Use it

Stylesheet
ggds.css includes it. To load only the parts you use: core.css, then components/layout.css (1.2 KB with gzip, minified).
JavaScript
None needed.

HTML

Copy the HTML under each example above. It works in any website.

Astro

With @ggds/astro:

HTML


<div class="ggds-with-aside">
  <div class="ggds-stack">…</div>
  <aside class="ggds-sticky">…</aside>
</div>
JSX (React)
<div className="ggds-with-aside">
  <div className="ggds-stack">…</div>
  <aside className="ggds-sticky">…</aside>
</div>

React and Next.js

No React component: switch the HTML under an example to JSX (React) and copy it.

Django

With ggds-django ({% load ggds %}):

HTML
<div class="ggds-with-aside">
  <div class="ggds-stack">…</div>
  <aside class="ggds-sticky">…</aside>
</div>
JSX (React)
<div className="ggds-with-aside">
  <div className="ggds-stack">…</div>
  <aside className="ggds-sticky">…</aside>
</div>

Classes and states

Classes for layout
ClassWhat it does
.ggds-stackThings one above the other with the same space between each (spacing 4 unless a gap class says otherwise). Their own top and bottom margins are removed.
.ggds-clusterThings side by side that wrap onto the next line: buttons, tags, links (gap 3).
.ggds-cluster--spreadA cluster with its first and last parts at opposite ends.
.ggds-cluster--topA cluster aligned to the top, for parts of different heights.
.ggds-cluster--baselineA cluster aligned on the first line of text.
.ggds-gridAs many columns of at least 16rem as fit; one column on phones (gap 4). Set --ggds-grid-min to change the width.
.ggds-grid--2Two columns from tablets; one on phones.
.ggds-grid--3Two columns from tablets, three from desktops; one on phones.
.ggds-grid--4Two columns from tablets, four from desktops; one on phones.
.ggds-with-asideMain content with a 20rem side column from desktops (set --ggds-aside-width to change it); one column before (gap 8).
.ggds-stickyOn desktops, stays in view while the page scrolls, clear of the header. For a side column.
.ggds-centerCentres its content both ways.
.ggds-growIn a cluster: takes the room left over.
.ggds-fixedIn a cluster: keeps its own width.
.ggds-shrinkIn a grid or cluster: may shrink below its content, so long words and tables do not widen the page.
.ggds-push-downPushes the last part of a card or column to its bottom edge.
.ggds-gap-*The gap of a stack, cluster, grid or with-aside, from the spacing scale: 1, 2, 3, 4, 6, 8 or 12.
.ggds-flushNo margin.
.ggds-mt-*Space above, from the spacing scale: 0, 2, 4, 6, 8 or 12. Prefer a stack.
.ggds-mb-0No space below.
.ggds-pad-*Space inside, from the spacing scale: 0, 3, 4 or 6.
.ggds-pad-fluidSpace inside: spacing 4 on phones, 8 from tablets.
.ggds-text-xsText sizes from the type scale: xs, sm, base, lg, xl and 2xl (.ggds-text-sm and so on).
.ggds-text-smSmall text.
.ggds-text-baseBody text size.
.ggds-text-lgLarge text.
.ggds-text-xlExtra large text.
.ggds-text-2xlThe size of a second-level heading.
.ggds-text-regularRegular weight.
.ggds-text-boldBold.
.ggds-text-mutedSecondary text colour, still easy to read (4.5 to 1 or more).
.ggds-text-institutionThe institution colour from its theme.
.ggds-text-monoThe monospace font, for reference numbers and codes.
.ggds-text-tightTight line height, for short text in cards and lists.
.ggds-nowrapKeeps text on one line: dates, amounts.
.ggds-surfaceThe page background.
.ggds-surface-raisedThe raised surface, for a box above the page.
.ggds-surface-sunkenThe sunken surface, for a band or a box set into the page.
.ggds-surface-brandA light tint of the government blue.
.ggds-borderA light border all round.
.ggds-border-topA light line above.
.ggds-border-bottomA light line below.
.ggds-border-strongMakes any of the borders above darker.
.ggds-roundedRounded corners.
.ggds-rounded-lgLarger rounded corners.
.ggds-rounded-fullFully rounded ends: a pill or a circle.
.ggds-clipHides what goes past its edges, so an image follows rounded corners.
.ggds-coverAn image or video that fills its box, cropped rather than stretched.
.ggds-fullFull width.
.ggds-full-phoneFull width on phones only.
.ggds-width-narrowAt most 42rem wide.
.ggds-width-mediumAt most 56rem wide.
.ggds-targetAt least 44px tall, the GGDS touch target.
.ggds-target-squareA 44px square with its content centred, for an icon button.
.ggds-from-tabletHidden on phones.
.ggds-from-desktopHidden on phones and tablets.
.ggds-below-desktopHidden on desktops.
.ggds-scroll-rowOn phones, a set of cards people swipe through sideways, each snapping into place with the next peeking in. From 48rem its own grid lays it out. Give it tabindex="0" and an aria-label if its cards hold no links, so keyboard users can scroll it.

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
  • Behaviour test: “layout classes change columns at the breakpoints”
  • Behaviour test: “no horizontal scrolling at 320px”
  • Behaviour test: “no horizontal scrolling at 320px with a wide font”

By people, with assistive technology

Automated tests find only some of the barriers people meet. These checks are still to be done.

Manual accessibility checks for layout
CheckResultNotes
Keyboard onlyNot tested yetWaiting for the external audit with disabled people (decision D-09).
NVDA screen reader with Firefox or Chrome (Windows)Not tested yetWaiting for the external audit with disabled people (decision D-09).
JAWS screen reader with Chrome (Windows)Not tested yetWaiting for the external audit with disabled people (decision D-09).
VoiceOver screen reader with Safari (iPhone)Not tested yetWaiting for the external audit with disabled people (decision D-09).
TalkBack screen reader with Chrome (Android)Not tested yetWaiting for the external audit with disabled people (decision D-09).
Zoom to 400%, and increased text spacingNot tested yetWaiting for the external audit with disabled people (decision D-09).
Windows contrast themes (forced colours)Not tested yetWaiting for the external audit with disabled people (decision D-09).
Voice control (Voice Access or Dragon)Not tested yetWaiting for the external audit with disabled people (decision D-09).

Changes

Changes to layout, newest first
VersionChange
0.4.0New: layout classes, so a government website can arrange its own content with GGDS alone, with no CSS framework. Stacks (ggds-stack), rows that wrap (ggds-cluster), grids that are one column on phones (ggds-grid, ggds-grid--2 to --4), main content with a side column from desktops (ggds-with-aside, ggds-sticky), gaps from the spacing scale (ggds-gap-1 to ggds-gap-12), and classes for text size, weight and colour, surfaces, borders, corners, touch targets and showing parts on some screens only. They use only GGDS tokens and breakpoints and add about 1 KB with gzip. They are in ggds.css, or load components/layout.css.
0.1.0Added.

Every change, in What’s new

  • Page template

    How the parts of a page fit together, in the same order on every government website.

  • Card

    A box that sums up a page, service or document and links to it.

  • Confirmation panel

    The top of the page people see when they have finished a task: that it worked, and their reference number.

Back to top

Something wrong, unclear or missing? Report a problem with this page or suggest a change to it on GitHub. You need a GitHub account.