• This repository has been archived on 26/Aug/2021
  • Stars
    star
    740
  • Rank 61,282 (Top 2 %)
  • Language
    HTML
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ›  Component code and tests for the Australian Government design system

The Australian Government Design System has been decommissioned Visit our community page for more information

Australian Government Design System Components

The components for the Australian Government Design System.

Documentation

Full documentation at designsystem.gov.au


Installation

Prerequisites

The design system components are distributed through the npm ecosystem. Npm requires node.js and the components needs node.js 8 or higher.

If you are not familiar with npm and want to use the design system, we have created a download page to help.

Once on the page you can select the components you wish to use and choose how you want do download them.

  • CSS minified will bundle the CSS of the components into a single file to be used directly in HTML.
  • CSS modules are used with modern JavaScript allowing you to import styles specific component styles.
  • SASS modules will create multiple SASS files that can be imported into a main.scss file.
  • JavaScript minified will bundle the JavaScript of the components together and minify them for use directly in HTML.
  • JavaScript modules are used when you want to break a part the components functionality.
  • React modules allow the components to be imported directly into React.

Installing modules

To install a module make sure you have a package.json file in the root of your project folders. (You can generate one by running npm init.) Inside your working folder install any module and pancake will make sure you have all assets ready to use.

Run npm install @gov.au/body to install the body module. To install several modules, chain them like:

npm install @gov.au/body @gov.au/header @gov.au/footer @gov.au/buttons

An even better experience is using Syrup. Install it globally via npm install -g @gov.au/syrup. More info coming soon.

โฌ† back to top


Frequently asked questions

View our frequently asked questions page to see common questions from the community.

If you canโ€™t find an answer to a question you have please email us at [email protected] or join our conversation on slack.

โฌ† back to top


Checklist and browser support

We use the below checklist to ensure new modules or updates to existing modules have a certain level of quality:

Checklist

General checks

  • Semantic HTML and non semantic test?
  • No JavaScript fallback?
  • SVG fallback, functional without SVG?
  • IE9, IE10, IE11 legacy test
  • IE8 functional test

Accessibility checks

  • Accessibility colour contrast
  • Keyboard accessible
  • Tested with screen reader
  • Accessibility expert review

CSS / Sass

  • Never nest anything that is not either an overwrite or a child element.
  • font-family and text color on elements that donโ€™t require body
  • Using AU-space() with unit for spacing everywhere but in font-sizes; no magic numbers
  • No hardcoded colors, use $AU-color- or $AU-colordark- vars.
  • Sass focus mixin AU-focus() or AU-focus( 'dark' )
  • Using AU-fontgrid() for font-size and line-height to snap typography to the grid.
  • Print style sheets

JavaScript

  • var AU = AU || {}; in top?
  • Each module has itโ€™s own name-space prefixed with AU e.g.: AU.modulename.function1, AU.modulename.function2
  • Keep public API small, use private functions where you can
  • Export out private function for tests only if( typeof module !== 'undefined' )
  • Export entire module in the end: if( typeof module !== 'undefined' ) { module.exports = AU; } so react can use it.
  • Provide sane defaults for parameters where you can
  • Add jest unit tests where you can
  • Document public API in the readme.

package.json

  • dependencies - peerDependencies check
  • Delete/enable js object and settings for pancake plugins

Browser support

All components have to work on the below browsers:

Browser Version Platform Engine
Internet Explorer 8 Windows 7 Trident
Internet Explorer 9 Windows 7 Trident
Internet Explorer 10 Windows 7 Trident
Internet Explorer 11 Windows 8.1 Trident
Edge Latest Windows 10 EdgeHTML
Firefox Latest OS X Gecko
Firefox Latest Windows 10 Gecko
Firefox Latest Android 6 Gecko
Chrome Latest OS X Blink
Chrome Latest Windows 10 Blink
Chrome Latest Android 4.0 Blink
Chrome Latest Android 6 Blink
Safari Latest (11) OS X WebKit
Safari Latest - 1 ( 10 ) iOS WebKit
Samsung G S8
Samsung G S7
Samsung G S6
Chrome pixel 7.1
Native browser Lumia 930 8.1
Chome +1
Safari +1
Firefox +1

โฌ† back to top


Modules

@gov.au/core
npm install @gov.au/core

See the visual test file for core
See the readme file for core

No dependencies
@gov.au/accordion
npm install @gov.au/accordion

See the visual test file for accordion
See the readme file for accordion

Dependencies:
โ”œโ”€ animate
โ””โ”€ core

@gov.au/animate
npm install @gov.au/animate

See the visual test file for animate
See the readme file for animate

No dependencies
@gov.au/body
npm install @gov.au/body

See the visual test file for body
See the readme file for body

Dependencies:
โ””โ”€ core

@gov.au/breadcrumbs
npm install @gov.au/breadcrumbs

See the visual test file for breadcrumbs
See the readme file for breadcrumbs

Dependencies:
โ”œโ”€ core
โ””โ”€ link-list
   โ”œโ”€ core
   โ””โ”€ body
      โ””โ”€ core

@gov.au/buttons
npm install @gov.au/buttons

See the visual test file for buttons
See the readme file for buttons

Dependencies:
โ””โ”€ core

@gov.au/callout
npm install @gov.au/callout

See the visual test file for callout
See the readme file for callout

Dependencies:
โ””โ”€ core

@gov.au/card
npm install @gov.au/card

See the visual test file for card
See the readme file for card

Dependencies:
โ””โ”€ core

@gov.au/control-input
npm install @gov.au/control-input

See the visual test file for control-input
See the readme file for control-input

Dependencies:
โ””โ”€ core

@gov.au/cta-link
npm install @gov.au/cta-link

See the visual test file for cta-link
See the readme file for cta-link

Dependencies:
โ””โ”€ core

@gov.au/direction-links
npm install @gov.au/direction-links

See the visual test file for direction-links
See the readme file for direction-links

Dependencies:
โ””โ”€ core

@gov.au/footer
npm install @gov.au/footer

See the visual test file for footer
See the readme file for footer

Dependencies:
โ””โ”€ core

@gov.au/form
npm install @gov.au/form

See the visual test file for form
See the readme file for form

Dependencies:
โ””โ”€ core

@gov.au/grid-12
npm install @gov.au/grid-12

See the visual test file for grid-12
See the readme file for grid-12

Dependencies:
โ””โ”€ core

@gov.au/header
npm install @gov.au/header

See the visual test file for header
See the readme file for header

Dependencies:
โ””โ”€ core

@gov.au/headings
npm install @gov.au/headings

See the visual test file for headings
See the readme file for headings

Dependencies:
โ””โ”€ core

@gov.au/inpage-nav
npm install @gov.au/inpage-nav

See the visual test file for inpage-nav
See the readme file for inpage-nav

Dependencies:
โ”œโ”€ core
โ””โ”€ link-list
   โ”œโ”€ core
   โ””โ”€ body
      โ””โ”€ core

@gov.au/keyword-list
npm install @gov.au/keyword-list

See the visual test file for keyword-list
See the readme file for keyword-list

Dependencies:
โ”œโ”€ core
โ””โ”€ link-list
   โ”œโ”€ core
   โ””โ”€ body
      โ””โ”€ core

@gov.au/link-list
npm install @gov.au/link-list

See the visual test file for link-list
See the readme file for link-list

Dependencies:
โ”œโ”€ core
โ””โ”€ body
   โ””โ”€ core

@gov.au/main-nav
npm install @gov.au/main-nav

See the visual test file for main-nav
See the readme file for main-nav

Dependencies:
โ”œโ”€ core
โ”œโ”€ animate
โ””โ”€ link-list
   โ”œโ”€ core
   โ””โ”€ body
      โ””โ”€ core

@gov.au/page-alerts
npm install @gov.au/page-alerts

See the visual test file for page-alerts
See the readme file for page-alerts

Dependencies:
โ”œโ”€ core
โ””โ”€ body
   โ””โ”€ core

@gov.au/progress-indicator
npm install @gov.au/progress-indicator

See the visual test file for progress-indicator
See the readme file for progress-indicator

Dependencies:
โ””โ”€ core

@gov.au/responsive-media
npm install @gov.au/responsive-media

See the visual test file for responsive-media
See the readme file for responsive-media

Dependencies:
โ””โ”€ core

@gov.au/searchbox
npm install @gov.au/searchbox

See the visual test file for searchbox
See the readme file for searchbox

Dependencies:
โ”œโ”€ core
โ”œโ”€ text-inputs
โ”‚  โ””โ”€ core
โ””โ”€ buttons
   โ””โ”€ core

@gov.au/select
npm install @gov.au/select

See the visual test file for select
See the readme file for select

Dependencies:
โ””โ”€ core

@gov.au/side-nav
npm install @gov.au/side-nav

See the visual test file for side-nav
See the readme file for side-nav

Dependencies:
โ”œโ”€ core
โ”œโ”€ animate
โ”œโ”€ accordion
โ”‚  โ”œโ”€ animate
โ”‚  โ””โ”€ core
โ””โ”€ link-list
   โ”œโ”€ core
   โ””โ”€ body
      โ””โ”€ core

@gov.au/skip-link
npm install @gov.au/skip-link

See the visual test file for skip-link
See the readme file for skip-link

Dependencies:
โ””โ”€ core

@gov.au/table
npm install @gov.au/table

See the visual test file for table
See the readme file for table

Dependencies:
โ””โ”€ core

@gov.au/tags
npm install @gov.au/tags

See the visual test file for tags
See the readme file for tags

Dependencies:
โ””โ”€ core

@gov.au/text-inputs
npm install @gov.au/text-inputs

See the visual test file for text-inputs
See the readme file for text-inputs

Dependencies:
โ””โ”€ core


โฌ† back to top


Tests

Visual tests have been built into each module and can be seen in either of the README.md files of each module or in the listing above. We have also integrated pa11y for accessibility testing and are using jest for javascript tests.

Run all tests with the npm test script:

npm run test

โฌ† back to top


Related repositories

โฌ† back to top

More Repositories

1

pancake

Making npm work for the front end and the Australian Government Design System.
JavaScript
94
star
2

design-system-site

๐Ÿ“š Documentation, rationale and accessibility guidance
JavaScript
80
star
3

design-system-starter

๐Ÿš€ The Australian Government Design System - Starter
SCSS
67
star
4

desktop.gov.au

Website for Protected Utility
HTML
43
star
5

certwatch

Go
21
star
6

notify

Send emails and text messages to your users if you work in Australian government
Python
16
star
7

service-manual

Digital Guides
JavaScript
14
star
8

performance-dashboard

Performance Dashboard for Australian Government https://dashboard.gov.au
JavaScript
13
star
9

cloud.gov.au

This repository contains the source code for the cloud.gov.au website.
TypeScript
12
star
10

sdget

A tool for using DNS TXT records as a key/value table
Go
11
star
11

chameleon

๐ŸฆŽ Interactive colour template previews for the Design System
HTML
11
star
12

datavizkit

A fully featured data visualisation toolset built on top of Highcharts and React. Guide at http://datavizkit.surge.sh/.
JavaScript
10
star
13

GAlileo

Quantifying interactions with government services to support delivery teams to improve their own products and services
Jupyter Notebook
10
star
14

cloud-assessment

Cloud Assessment Tool beta - The common cloud assessment framework
TypeScript
9
star
15

graylog-boshrelease

BOSH release for graylog logging service
Shell
9
star
16

australia-gov-au-static

https://info.australia.gov.au
HTML
9
star
17

content-guide

Content Guide
SCSS
8
star
18

accessibility

A non-biased, community-driven effort expanding all 50 WCAG 2.1 AA success criteria into discrete tests grouped under filtered categories
8
star
19

dta-gov-au

A Drupal 8 sub-theme for the DTA website.
CSS
7
star
20

furnace

๐Ÿ”ฅ Melts down the Design System components into a zip file.
JavaScript
6
star
21

tunneler

Connect to services via an ssh tunnel
Python
6
star
22

smart-cities

JavaScript
5
star
23

dashboards

A monorepo for the dashboards team. Contains the Smart Cities, Performance Dashboard, and Red Tape Reduction sites.
JavaScript
5
star
24

dta-uikit-base

A Drupal 8 base theme using the DTA's UI Kit.
CSS
5
star
25

pay

Take online payments from your users if you work in Australian government
TypeScript
5
star
26

dta-website-rebuild

Repository to hold code for www.dta.gov.au
PHP
4
star
27

oneAPS-website

Website for the oneAPS Government Opportunities platform
C#
3
star
28

ausgov

Streamlined static site POC for australia.gov.au
JavaScript
3
star
29

emailtemplate

A Go package for loading email templates (consisting of a subject, HTML and text Go template file)
Go
3
star
30

cf-example-staticfile

Example staticfile buildpack application
Shell
3
star
31

cf-report-users

CF CLI plugin to print table of users
Go
3
star
32

grafana-cf

Grafana proxy to use cf access to authorise dashboards
Go
3
star
33

domain-name-alpha

Alpha prototypes for a redesigned Australian government domain name service
CSS
3
star
34

message-lab-theme

A Drupal 8 theme for the Message Library.
CSS
2
star
35

digitalmarketplace

C#
2
star
36

cf-report-buildpacks

Go
2
star
37

cga-docs

Source code for our user facing cloud.gov.au docs
CSS
2
star
38

stemcell-diff

Utility to download light stemcells and display package.txt differences
Go
2
star
39

observatory-website

Landing page for gov.au Observatory
TypeScript
2
star
40

wofg-web-es-inject

Code for injecting metadata extracted from WARC as JSON into Elasticsearch as part of the WofG Web Reporting Service.
Python
2
star
41

style-manual

JavaScript
2
star
42

gridly

A grid bookmarklet for the UI-Kit
HTML
2
star
43

instant-https-boshrelease

A BOSH release for just adding HTTPS to web services
Shell
2
star
44

notify-client-java

Notify.gov.au Java client
Java
1
star
45

www-gov-au

static site for www.gov.au
CSS
1
star
46

verifiable-logs

Experimental only for now
JavaScript
1
star
47

cga-proxy-test

Go
1
star
48

redirect-staging-apps

Remove old staging apps from search engines
HTML
1
star
49

notify-client-node

Notify.gov.au Node.js client
TypeScript
1
star
50

message-lab

Message Lab website built using Drupal 8.
PHP
1
star
51

wofg-web-filters

Filters for processing Web ARChive (WARC) files as part of the WofG Web Reporting Service
Groovy
1
star
52

notify-client-go

Notify.gov.au Go client
Go
1
star
53

digitalmarketplace-azure-functions

C#
1
star
54

cf-report-memory-usage

Go
1
star
55

cga-kibana-for-cf

JavaScript
1
star
56

cga-image-rotator

Go
1
star
57

style-manual-reference

HTML
1
star
58

oecd-business-case-playbook

Alpha website for the OECD Business Case Playbook.
HTML
1
star
59

notify-client-dotnet

Notify.gov.au .NET client
C#
1
star
60

level3-dashboard

CSS
1
star
61

cf-cli

Provides a docker image with the cloudfoundry CLI and plugins for deploying to cloud.gov.au
Dockerfile
1
star
62

cloud-chaos

set of chaos toolkit scripts to test the resiliency of cloud.gov.au
Shell
1
star
63

wofg-web-dashboard

Kibana configuration for WofG Web Reporting Service dashboard
1
star
64

logsearch-healthcheck

concourse pipeline to test that logsearch s3 archiving is working correctly
Shell
1
star
65

govshare-static

GovShare static site
CSS
1
star
66

docs.desktop.gov.au

Prototype website options for hosting Protected Utility documentation. This repository has been superseded with the following link.
HTML
1
star
67

cf-go-helloworld

Getting started app using Golang, Postgres, CloudFoundry, CircleCI.
Go
1
star
68

le-dns-certs

Simple tool to fetch certificates via Let's Encrypt DNS challenge, route53 and S3
Go
1
star
69

handbook

DTA Technology Handbook
HTML
1
star
70

inbox-alpha

Alpha concept testing for the Inbox platform
JavaScript
1
star
71

semanticuserjourneys

User journey through semantic analysis informed probabilistic modelling
HTML
1
star
72

deploy-prometheus

deployment pipeline and BOSH operators for prometheus
Shell
1
star
73

notifications-admin

DTA fork of GOV.UK Notify frontend
Python
1
star
74

notifications-utils

DTA fork of GOV.UK shared Notify code
Python
1
star
75

notify-client-python

Notify.gov.au Python client
Python
1
star