Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 2.83 KB

File metadata and controls

77 lines (53 loc) · 2.83 KB

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 npm or yarn.

npm install --save nhsuk-react-components

# Or
yarn add nhsuk-react-components

Usage

import { DateInput, Form } from 'nhsuk-react-components';

<Form noValidate>
  <DateInput
    hint="For example, 15 3 1984"
    legend="What is your date of birth?"
    legendProps={{ size: 'l' }}
    id="date-of-birth"
    error="Date of birth must include a day"
  >
    <DateInput.Day />
    <DateInput.Month error={false} />
    <DateInput.Year error={false} />
  </DateInput>

  <Button>Save and continue</Button>
</Form>;

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.

  • 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

Chromatic

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