TechPunk316 / govuk-frontend

This project is in Alpha. Not for production use.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:MIT License


Languages

Language:CSS 81.7%Language:HTML 13.0%Language:JavaScript 5.2%Language:Shell 0.1%