Skip to main content
Table of contents

Install from dist


When installing from dist, you are using compiled and minified versions of the stylesheet. This means that you will not be able to:

  • selectively include the CSS or JavaScript for individual components.
  • build your own styles or components based on the palette or typography and spacing mixins.
  • customise the build (for example, overriding colours or enabling global styles).
  • use the component Nunjucks templates.

If you require any of this functionality, you should install GOV.UK Frontend using node package manager instead.

Steps to install

1. Download resources

Download the latest compiled and minified versions of the stylesheets, JavaScript and the assets:

2. Include resources

You must copy the entire assets folder to the root of your service.

Follow the below example to add the CSS and JavaScript files to your HTML template. This example assumes you have copied the stylesheets and JavaScript files to /stylesheets and /javascript respectively.

<!DOCTYPE html>
    <!--[if !IE 8]><!-->
      <link rel="stylesheet" href="stylesheets/govuk-frontend-[latest version].min.css">
    <!--[if IE 8]>
      <link rel="stylesheet" href="stylesheets/govuk-frontend-ie8-[latest-version].min.css">
    <!-- Copy and paste component HTML-->
    <button class="govuk-button">This is a button component</button>
    <script src="javascript/govuk-frontend-[latest version].min.js"></script>