NHS.UK Frontend components ported to React
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
.
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.
A React Storybook featuring all of the components is located here.
npm install --save nhsuk-react-components
yarn add nhsuk-react-components
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>
);
}
}
MIT © Thomas Judd-Cooper
NHS.UK styles and components ported from MIT © NHS.UK frontend.