This guide explains how to create prototypes using the MOJ Pattern Library and GOV.UK Prototype Kit.
Use a template from Cloud Platform
You can follow the MOJ Cloud Platform guide to automatically set up a GitHub repository containing the GOV.UK Prototype Kit and a hosting environment.
This template comes with the MOJ Pattern Library pre-installed so you don't need to set it up manually. However you may need to update it using the instructions below.
Alternatively, you can install the GOV.UK Prototype Kit and MOJ Pattern Library manually. You must follow the GOV.UK Design System prototype setup guide first. Once you've done that, continue below.
Installing MOJ Frontend
The MOJ Pattern Library uses MOJ Frontend. To install it, run these steps:
- open Terminal
- change the directory to your prototype. For example,
npm install @ministryofjustice/frontend --save
Updating MOJ Frontend
The current version of MOJ Frontend is 0.2.1.
You can check which version your prototype is running by opening
package.json in the root folder of your prototype. Look for
To update your prototype to the latest version of MOJ Frontend:
package.jsonin the root folder of your prototype in a text editor
dependencies, update the reference to MOJ Frontend to
- open Terminal/command line
- change the directory to your prototype's directory. For example,