fatmedia / govuk-drupal-theme
A base Drupal theme using GovUK framework
Package info
bitbucket.org/fatmedia/govuk-drupal-theme
Type:drupal-theme
pkg:composer/fatmedia/govuk-drupal-theme
This package is auto-updated.
Last update: 2026-05-01 14:06:00 UTC
README
Intro
This is a custom Drupal theme which uses gov.uk framework. It's meant to be used as a base (parent) theme for custom themes based on the gov.uk framework.
This theme pulls gov.uk framework stylesheets, scripts and assets, and provides styling and templates for default elements and components (see 'Included elements and components' list below).
Prerequisites
This theme assumes that you have:
- Node >= 24 - this theme was successfully tested using version 24.14.1
- NPM (Node Package Manager) >= 11 - this theme was successfully tested using version 11.1.0
QuickStart
To work on this theme, first you'll need to install all required packages for the theme:
$ npm install
This installs all required packages for the theme, including the gov.uk framework (node_modules/govuk-frontend)
Build tasks
Compile everything:
$ npm run build
Compile CSS:
$ npm run scss
Compile JS:
$ npm run js
Updating GOV.uk framework
In order to update gov.uk framework, you need to update the govuk-frontend package (change its version in
theme's package.json file, and run npm install).
Check release notes for the new version of the gov.uk framework, to see if there are any breaking changes.
If necessary, update SCSS imports in src/scss/_base-imports.scss file.
And recompile the theme:
$ npm run build
Included elements and components
Base elements
- headings
- lists (ol, ul)
- paragraphs
- blockquotes
- links
- tables
Form elements
- text
- date
- password
- file upload
- select
- textarea
- radio
- radios
- checkbox
- checkboxes
- fieldset
- legend
- submit button
- error message / state for a field
Base components
- breadcrumbs
- pagination
- skip link
- status messages
- tabs
Govuk subtheme
Govuk Base is a parent theme of Govuk Subtheme. The Subtheme is a starting point for creating a custom Drupal theme based on a Govuk base theme. It's a scaffolding for a theme and a set of build tasks.
See Govuk Subtheme README for more information.