A long-lived project that still receives updates
A gem to document components in GOV.UK frontend applications
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Project Readme

GOV.UK Publishing Components

status JavaScript Style Guide Stylelint Style Guide

govuk_publishing_components is a Ruby gem to document and distribute components for GOV.UK applications. It provides:

  • a shared library of components
  • helpers to generate component payloads
  • an application to preview components and provide guidance
  • GOV.UK Design System styles and components (via GOV.UK Frontend)

Only add a component to this gem if it is required in more than one application. Please do not add application-specific components to govuk_publishing_components.

All components should meet the accessibility standards for browser and assistive technology support described in GOV.UK Frontend.

Technical documentation

Run the application

./startup.sh

See also Local frontend development.

Run the test suite

bundle install
yarn install
bundle exec rake

Run the JavaScript tests alone

With text-only output to the terminal:

yarn run jasmine:ci

With output viewable in a browser at http://localhost:8888/:

yarn run jasmine:browser

You need to restart the jasmine:browser test server for it to pick up any changes to JavaScript code.

Use the gem

Manage the gem

Make a new component

Further documentation

There is more documentation in the docs directory.

Licence

MIT Licence