Skip to content

TechPunk316/govuk-frontend

 
 

Repository files navigation

GOV.UK Frontend · Build Status JavaScript Style Guide

What is it?

A single package containing everything needed to start building a GOV.UK service.

🚨 This project is in development and these instructions are likely to change. 🚨

Guidance for building a GOV.UK service - [GOV.UK Design System](TODO: Insert link to GOV.UK Design System).

Quick start

🚨 This will not work until packages are published to npm. 🚨

npm install --save @govuk-frontend/all

Include the CSS and JavaScript

<!DOCTYPE html>
<html>
  <head>
    <title>Example</title>
    <link rel="stylesheet"
          href="node_modules/@govuk-frontend/all/all.min.css">
  </head>
  <body>
    <!-- Copy and paste component HTML-->
    <button class="govuk-c-button">This is a button component</button>
    <script src="node_modules/@govuk-frontend/all/all.min.js"></script>
  </body>
</html>

Installation

Install all components

npm install --save @govuk-frontend/all

Install individual components

Install a button component

npm install --save @govuk-frontend/button

All components can be found in the packages directory. Each component has a README with installation and usage instructions.

Usage

HTML

Copy and paste component HTML [from here](TODO: Insert link to GOV.UK Design System).

SCSS

In your main.scss file

// All components
@import "@govuk-frontend/all/all";

// Pick and choose components
@import "@govuk-frontend/button/button";
@import "@govuk-frontend/input/input"

Docs

Check out the GOV.UK Frontend documentation.

Licence

MIT license.

Contributing

View our contribution guidelines.

About

This project is in Alpha. Not for production use.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 81.7%
  • HTML 13.0%
  • JavaScript 5.2%
  • Shell 0.1%