has been released! Read the upgrade guide

Installation & quick start

The documentation on this page is considered legacy.

We will be updating this content to our new principle-based format in the near future.


To install and save to your project's package.json dependencies, run:

npm install @defencedigital/fonts @defencedigital/react-component-library

NOTE: As of 2.16.0 the styled-components package is now a required peerDependency.

2Quick start

Here's a quick example to get you started:

1import React from 'react'
2import ReactDOM from 'react-dom'
3import '@defencedigital/fonts'
4import { GlobalStyleProvider, Button } from '@defencedigital/react-component-library'
5function App() {
6 return (
7 <GlobalStyleProvider>
8 <Button variant="primary">
9 Hello, World!
10 </Button>
11 </GlobalStyleProvider>
12 )
14ReactDOM.render(<App />, document.querySelector('#app'))

The MOD.UK Design System provides guidance and tools for building high–quality Services within the UK Ministry of Defence. This project is open source and its source code is available on GitHub.

All content is available under the Apache 2.0 licence, except where otherwise stated.

© Crown copyright