Skip to content

An implementation of the GOV.UK Design System in React that provides support for writing internal applications in addition to public ones.

License

Notifications You must be signed in to change notification settings

daniel-ac-martin/NotGovUK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0c3950b · Feb 25, 2025
Oct 24, 2022
Feb 10, 2025
Sep 14, 2024
Jan 6, 2025
Jan 21, 2025
Jan 21, 2025
Feb 24, 2025
Feb 16, 2025
Feb 18, 2025
Nov 30, 2024
Feb 16, 2025
Feb 24, 2025
May 28, 2020
Jan 2, 2025
Jul 21, 2020
Jan 2, 2025
Jul 17, 2022
Apr 30, 2020
Dec 26, 2020
Dec 24, 2020
Aug 18, 2020
Jul 19, 2022
Jul 26, 2024
Oct 10, 2024
Aug 11, 2020
Feb 16, 2025
May 10, 2022
Feb 25, 2025
Nov 7, 2024
Dec 9, 2024
Jul 20, 2022
Oct 10, 2024
Oct 10, 2024
Nov 19, 2020
Oct 12, 2024
Jul 19, 2022

Repository files navigation

NotGovUK

An implementation of the GOV.UK Design System in React that provides support for writing internal applications in addition to public ones. See: About NotGovUK

The components are written in Typescript and documented in Storybook's MDX format.

Warning: This is a work in progress and should only be used in production by brave souls.

(See our documentation site and our Storybook.)

Consuming these components

In order to consume these components you will require a system that utilised a bundler (such as Webpack) that can process imported assets such as images, fonts and Sass files. Create React App may be able to do this but does not provide Server-Side Rendering (SSR). You will also need to ensure that you provide an instance of react-router.

As such, we suggest that you use our specially designed tech stack for this purpose. See: Getting started.

Working on this repository

See: Working on and contributing to NotGovUK

Navigating this repository

The is a monorepo and so it contains multiple packages. The packages are broken down into libraries, components and applications.

  • apps/ Applications
  • lib/ Libraries
  • components/ Components (Special libraries that include assets, such as Sass code and images, and are intended to be consumed via Webpack. The structure of these is explained below.)
  • coverage/ A code coverage report that can be created by running make test.
  • storybook-static/ A static version of the storybook that can be created by running make docs.

Files in a typical component

  1. src/Component.ts[x] The implementation of the component. It may reference other .tsx files in order to separate business logic from presentation logic. Otherwise, it will typically be very simple and contain mostly HTML code.
  2. assets/Component.scss The SCSS (CSS) code that pertains to the component.
  3. spec/Component.spec.ts The tests for this component.
  4. spec/Component.stories.mdx The main documentation of the component. This is what people will use to understand how to consume the component.
  5. README.md Very simple documentation to aid people browsing the code via GitHub. Typically this will just link to the GOV.UK Design System and include a screenshot of the component.

Contributing

Pull requests are welcome but it is probably best to open an issue first to discuss what you think needs to change.

I would like this project to be as easy as possible to both consume and contribute to. To that end, if you think any of the documentation isn't clear please do let me know by raising an issue or a pull request.

Finally, this work is still at quite an early stage. If you run into any problems or have any questions, please do get in touch.

-- Daniel Martin, December 2019 (updated August 2020).