Skip to content

NHSDigital/nhsuk-react-native-components

Repository files navigation

NHS.UK React Native components

Build Language grade: JavaScript

Note: This package is currently pre-alpha. It is not yet ready for use in production.

NHS.UK React Native components contains the code you need to start building user interfaces for NHS apps written in React Native.

Originally created by NHS Blood & Transplant, maintained by NHS Digital.

Table of contents

Guidance

Visit the NHS digital service manual for examples of components and guidance for when to use them. If we haven’t yet published guidance on the component you want, please email us or get in touch on the NHS digital service manual Slack workspace.

Installation

To install:

npm install nhsuk-react-native-components

Dependency info

Dependency Used for
color Manipulating various colour styles.
react-native-picker-select Implementing the native platform select component.
react-native-svg Rendering SVG content.

Consumer app setup

Using the Frutiger font files

IMPORTANT: in order to use the Frutiger font in a production app, you must supply your app-specific own font licence for every variation of the font you wish to use (regular, bold, light etc.).

For a bare React Native app, a react-native.config.js file is needed with the following content to use the font files:

module.exports = {
  assets: ['./node_modules/nhsuk-react-native-components/dist/assets/fonts/'],
};

Then run npx react-native link to link the font files to the native platform config files.

Contribute

Read our contributing guidelines to contribute to NHS.UK frontend.

Get in touch

NHS.UK frontend is maintained by NHS Digital. Email us, open a GitHub issue or get in touch on the NHS digital service manual Slack workspace.

Licence

The codebase is released under the MIT Licence, unless stated otherwise. This covers both the codebase and any sample code in the documentation. The documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.