react-components 1.0.0
Install from the command line:
Learn more about npm packages
$ npm install @ukhomeoffice/react-components@1.0.0
Install via package.json:
"@ukhomeoffice/react-components": "1.0.0"
About this version
A set of react components to build the basic elements described in GOV.UK Design System.
This is a fork of govuk-react-components which replaces the older govuk_frontend_toolkit with the newer govuk-frontend styles based on the GOV.UK Design System, and adds some additional Home Office specific components.
Authenticate with GitHub packages
Install the package and any dependencies you have:
# Install @ukhomeoffice/react-components
npm install --save @ukhomeoffice/react-components
# This project assumes react & prop-types are installed already. If not use the following
npm install --save @ukhomeoffice/react-components react prop-types
Components can then be used in the following way:
import React from 'react';
import { Input, Button } from '@ukhomeoffice/react-components';
const MyForm = () => (
<form>
<Input name="name"
label="First name"
hint="Some additional information"
error="Oh no! You broke it!"
value="HELLO!"
/>
<Button>Submit</Button>
</form>
);
export default MyForm;
There is a basic example app in ./example
. To run it:
$ cd example
$ npm start
$ open http://localhost:8080
This is automatically published to the GitHub packages npm repository using GitHub Actions.
When opening a pull request add a label major
, minor
or patch
(or skip-release
) and the version field in package.json will be updated by the pipeline using npm version
.
It is published once the pull request is merged if there is no skip-release
label on the pull request, the SHA is also tagged with the SemVer value at that point.
Details
- react-components
- UKHomeOffice
- over 1 year ago
- MIT
- 30 dependencies
Assets
- react-components-1.0.0.tgz
Download activity
- Total downloads 4,275
- Last 30 days 535
- Last week 175
- Today 36