Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.7 KB

README.md

File metadata and controls

55 lines (35 loc) · 2.7 KB

nhsuk-react-components

NHS.UK Frontend components ported to React

Build NPM JavaScript Style Guide Bundle Size Codacy Badge Code Coverage

Deprecation Notice

This version (latest 0.8.15) of the nhsuk-react-components library is deprecated in favour of the newer version of the library, available here. You can install the newer version of the library by using npm i nhsuk-react-components@next or yarn add nhsuk-react-components@next.

Notes

This package is developed by NHS Digital, but it is not from the NHS.UK redesign team. Some things may differ between the standard NHS.UK frontend library and this library, however we will try our best to keep this package maintained and up-to-date.

This package is still under development, so there may be breaking changes in minor and patch version updates. As of the 1.0.0 release, only major updates will make breaking changes.

Storybook

A React Storybook featuring all of the components is located here.

Install

npm install --save nhsuk-react-components

yarn add nhsuk-react-components

Usage

import React, { Component } from 'react';

// You can import from the global component
import { Panel } from 'nhsuk-react-components';

// // [RECOMENDED] Or import only the components you will use (this will reduce the total bundle size)
import Panel from 'nhsuk-react-components/lib/components/panel';

class Example extends Component {
  render() {
    return (
      <Panel label="TestPanel">
        <p>Hello!</p>
      </Panel>
    );
  }
}

License

MIT © Thomas Judd-Cooper

NHS.UK styles and components ported from MIT © NHS.UK frontend.