NHSDigital / nhsuk-react-components

NHS.UK Frontend ported to React
https://nhsdigital.github.io/nhsuk-react-components
MIT License
56 stars 33 forks source link

NHS.UK React components

This repository contains the code for NHS.UK React components - a port of the NHS.UK Frontend components.

GitHub Actions CI Status Bundle Size

Documentation and examples

View documentation and examples

Installation

You can install this package using either yarn or npm.

npm install --save nhsuk-react-components
# Or
yarn add nhsuk-react-components

Usage

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 <Button>Click Me!</Button>;
  }
}

Upgrading

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).

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

Thanks

Chromatic

Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.