Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevindew/govuk-frontend-import-test
https://github.com/kevindew/govuk-frontend-import-test
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kevindew/govuk-frontend-import-test
- Owner: kevindew
- Created: 2019-10-30T14:17:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T14:18:18.000Z (about 5 years ago)
- Last Synced: 2024-10-05T01:41:10.897Z (about 1 month ago)
- Language: JavaScript
- Size: 319 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GOV.UK Frontend
GOV.UK Frontend contains the code you need to start building a user interface
for government platforms and services.See live examples of GOV.UK Frontend components, and guidance on when to use
them in your service, in the [GOV.UK Design System](https://www.gov.uk/design-system).## Contact the team
GOV.UK Frontend is maintained by a team at Government Digital Service. If you want to know more about GOV.UK Frontend, please email the [Design System
team](mailto:[email protected]) or get in touch with them on [Slack](https://ukgovernmentdigital.slack.com/messages/govuk-design-system).## Quick start
There are 2 ways to start using GOV.UK Frontend in your app.
Once installed, you will be able to use the code from the examples in the
[GOV.UK Design System](https://www.gov.uk/design-system) in your service.### 1. Install with npm (recommended)
We recommend [installing GOV.UK Frontend using node package manager
(npm)](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/installing-with-npm.md).### 2. Install by using compiled files
You can also [download the compiled and minified assets (CSS, JavaScript) from
GitHub](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/installing-from-dist.md).## Importing styles
You need to import the GOV.UK Frontend styles into the main Sass file in your
project. You should place the below code before your own Sass rules (or Sass
imports) if you want to override GOV.UK Frontend with your own styles.To import add the below to your Sass file:
```scss
@import "node_modules/govuk-frontend/all";
```[More details on importing styles](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/installing-with-npm.md#importing-styles)
## Importing JavaScript
Some of the JavaScript included in GOV.UK Frontend improves the usability and
accessibility of the components. You should make sure that you are importing and
initialising Javascript in your application to ensure that all users can use it successfully.You can include Javascript for all components either by copying the `all.js` from `node_modules/govuk-frontend` into your application or referencing the file directly:
```html
```
Next you need to initialise the script by adding:```html
window.GOVUKFrontend.initAll()
```[More details on importing Javascript and advanced options](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/installing-with-npm.md#importing-javascript)
## Importing assets
In order to import GOV.UK Frontend images and fonts to your project, you should configure your application to reference or copy the relevant GOV.UK Frontend assets.
[More details on importing assets](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/installing-with-npm.md#import-assets)
## Getting updates
To be notified when there’s a new release, you can either:
- [watch the govuk-frontend Github repository](https://help.github.com/en/articles/watching-and-unwatching-repositories)
- join the [#govuk-design-system channel on cross-government Slack](https://ukgovernmentdigital.slack.com/app_redirect?channel=govuk-design-system)Find out how to [update with npm](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/updating-with-npm.md).
## Licence
Unless stated otherwise, the codebase is released under the MIT License. This
covers both the codebase and any sample code in the documentation. The
documentation is © Crown copyright and available under the terms of the
Open Government 3.0 licence.## Contribution guidelines
If you want to help us build GOV.UK Frontend, view our [contribution
guidelines](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md).