https://github.com/nhsdigital/nhsuk-react-components
NHS.UK Frontend ported to React
https://github.com/nhsdigital/nhsuk-react-components
Last synced: 10 months ago
JSON representation
NHS.UK Frontend ported to React
- Host: GitHub
- URL: https://github.com/nhsdigital/nhsuk-react-components
- Owner: NHSDigital
- License: mit
- Created: 2020-01-22T15:36:33.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-28T14:11:31.000Z (about 1 year ago)
- Last Synced: 2025-03-30T05:04:40.173Z (10 months ago)
- Language: TypeScript
- Homepage: https://nhsdigital.github.io/nhsuk-react-components
- Size: 10.2 MB
- Stars: 59
- Watchers: 72
- Forks: 33
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NHS.UK React components
This repository contains the code for NHS.UK React components - a port of the [NHS.UK Frontend components](https://github.com/nhsuk/nhsuk-frontend).
[](https://github.com/NHSDigital/nhsuk-react-components/actions?query=workflow%3A%22CI+Build%22+branch%3Amain) [](https://bundlephobia.com/result?p=nhsuk-react-components)
## Documentation and examples
[View documentation and examples](https://nhsdigital.github.io/nhsuk-react-components)
## Installation
You can install this package using either `yarn` or `npm`.
```bash
npm install --save nhsuk-react-components
# Or
yarn add nhsuk-react-components
```
## Usage
```jsx
import React, { PureComponent } from 'react';
// You can import components from the global module
import { Button } from 'nhsuk-react-components';
// Or you can import components directly
import Button from 'nhsuk-react-components/lib/components/button';
class GetStartedButton extends PureComponent {
render() {
return Click Me!;
}
}
```
## Upgrading
- [Upgrading to 1.0](/docs/upgrade-to-1.0.md)
- [Upgrading to 2.0](/docs/upgrade-to-2.0.md)
- [Upgrading to 3.0](/docs/upgrade-to-3.0.md)
- [Upgrading to 4.0](/docs/upgrade-to-4.0.md)
- [Upgrading to 5.0](/docs/upgrade-to-5.0.md)
## Maintainers
**We’re currently looking for new maintainers** If you have knowledge of React and would be willing to help maintain this library, you can [email me (Thomas Judd-Cooper)](mailto:thomas.judd-cooper1@nhs.net).
- Thomas Judd-Cooper ([GitHub](https://github.com/tomdango))
- Sam Brown ([GitHub](https://github.com/samueldavidbrown))
- Luke Pearson ([GitHub](https://github.com/lukepearson))
- Kevin Kuszyk ([GitHub](https://github.com/kevinkuszyk))
- Kai Spencer ([GitHub](https://github.com/KaiSpencer))
- Ed Horsford ([GitHub](https://github.com/edwardhorsford))
## Preparing releases
Releases run in CI using github actions.
To prepare a release create a new release TAG in github with your release version.
> `NPM_TOKEN` should be stored in the repositories [secrets in GitHub](https://github.com/NHSDigital/nhsuk-react-components/settings/secrets/actions)
- Create a new release with a tag like `major.minor.patch` against main.
- If the change is a `beta` then select `pre-release` as true, this will make the `tag` point at `beta`. Otherwise the tag will be `latest`.
## Thanks
Thanks to [Chromatic](https://www.chromatic.com/) for providing the visual testing platform that helps us review UI changes and catch visual regressions.