diff --git a/src/components/back-link/default.njk b/src/components/back-link/default.njk
new file mode 100644
index 0000000000..73b33d50f8
--- /dev/null
+++ b/src/components/back-link/default.njk
@@ -0,0 +1,9 @@
+---
+layout: layout-example.njk
+---
+{% from "back-link/macro.njk" import govukBackLink %}
+
+{{ govukBackLink({
+ "text": "Back",
+ "href": "#"
+}) }}
diff --git a/src/components/back-link/index.md.njk b/src/components/back-link/index.md.njk
new file mode 100644
index 0000000000..02d8c2529f
--- /dev/null
+++ b/src/components/back-link/index.md.njk
@@ -0,0 +1,37 @@
+---
+title: Back link
+description: Use the Back link component to help users go back to the previous page in a multi-page transaction.
+section: Components
+aliases:
+layout: layout-components.njk
+---
+
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'back-link', example: 'default'}) }}
+
+Use the Back link component to help users go back to the previous page in a multi-page transaction.
+
+## When to use this component
+
+Always include the Back link component on GOV.UK [Question pages](../../patterns/question-pages).
+
+You can include a back link on other pages within a multi-page transaction, if it makes sense to do so.
+
+### When not to use this component
+
+Don’t use the Back link component together with [Breadcrumbs](../breadcrumbs). If necessary, you should do research with your users to find out which they find more helpful in your service.
+
+## How it works
+
+Back links must always go at the top of a page.
+
+Make sure the link takes users to the previous page, and that it works even when JavaScript isn’t available.
+
+There are 2 ways to use the Back link component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Back link macro.
+
+{{ example({group: 'components', item: 'back-link', example: 'default', html: true, nunjucks: true, open: true}) }}
+
+## Research on this component
+
+If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
diff --git a/src/components/breadcrumbs/default.md.njk b/src/components/breadcrumbs/default.njk
similarity index 100%
rename from src/components/breadcrumbs/default.md.njk
rename to src/components/breadcrumbs/default.njk
diff --git a/src/components/breadcrumbs/index.md.njk b/src/components/breadcrumbs/index.md.njk
index b21fbe04d2..7edceb42bc 100644
--- a/src/components/breadcrumbs/index.md.njk
+++ b/src/components/breadcrumbs/index.md.njk
@@ -26,7 +26,7 @@ If you’re using other navigational devices on the page, such as a sidebar, con
The Breadcrumbs component should include the user’s current page, which should be visually different from the other pages linked to in the breadcrumb.
-There are two ways to use the Breadcrumbs component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the Breadcrumbs macro.
+There are 2 ways to use the Breadcrumbs component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the Breadcrumbs macro.
{{ example({group: 'components', item: 'breadcrumbs', example: 'default', html: true, nunjucks: true, open: true}) }}
diff --git a/src/components/button/default.njk b/src/components/button/default.njk
new file mode 100644
index 0000000000..4fe990fd53
--- /dev/null
+++ b/src/components/button/default.njk
@@ -0,0 +1,8 @@
+---
+layout: layout-example.njk
+---
+{% from "button/macro.njk" import govukButton %}
+
+{{ govukButton({
+ "text": "Save and continue"
+}) }}
diff --git a/src/components/button/disabled.njk b/src/components/button/disabled.njk
new file mode 100644
index 0000000000..ef83d25b03
--- /dev/null
+++ b/src/components/button/disabled.njk
@@ -0,0 +1,27 @@
+---
+layout: layout-example.njk
+---
+{% from "button/macro.njk" import govukButton %}
+
+
+
+{{ govukButton({
+ "text": "Disabled <button>",
+ "element": "button",
+ "disabled": true
+}) }}
diff --git a/src/components/button/index.md.njk b/src/components/button/index.md.njk
new file mode 100644
index 0000000000..35067d3084
--- /dev/null
+++ b/src/components/button/index.md.njk
@@ -0,0 +1,44 @@
+---
+title: Button
+description: GOV.UK Button
+section: Components
+aliases:
+layout: layout-components.njk
+---
+
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'button', example: 'default'}) }}
+
+## When to use this component
+
+Use the Button component to help users carry out an action on a GOV.UK page like starting an application or saving their progress.
+
+## How it works
+
+Write button text in sentence case, describing the action it performs. For example ‘Save and continue’ or ‘Start now’.
+
+Align the primary action button to the left edge of your form.
+
+There are 2 ways to use the Button component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Button macro.
+
+{{ example({group: 'components', item: 'button', example: 'primary', html: true, nunjucks: true, open: true}) }}
+
+
+## Start buttons
+
+Use a start button as the main call to action on your service’s start page.
+
+{{ example({group: 'components', item: 'button', example: 'start', html: true, nunjucks: true, open: false}) }}
+
+### Disabled buttons
+
+Disabled buttons have poor contrast and can confuse some users, so avoid them if possible.
+
+Only use disabled buttons if research shows it makes the user interface easier to understand.
+
+{{ example({group: 'components', item: 'button', example: 'disabled', html: true, nunjucks: true, open: false}) }}
+
+## Research on this component
+
+If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
diff --git a/src/components/button/primary.njk b/src/components/button/primary.njk
new file mode 100644
index 0000000000..e56f1825ae
--- /dev/null
+++ b/src/components/button/primary.njk
@@ -0,0 +1,25 @@
+---
+layout: layout-example.njk
+---
+{% from "button/macro.njk" import govukButton %}
+
+
',
+ "legendHintText": "If you have dual nationality, select all options that are relevant to you."
+ },
+ "items": [
+ {
+ "value": "british",
+ "text": "British"
+ },
+ {
+ "value": "irish",
+ "text": "Irish"
+ },
+ {
+ "value": "other",
+ "text": "Citizen of another country"
+ }
+ ]
+}) }}
diff --git a/src/components/checkboxes/index.md.njk b/src/components/checkboxes/index.md.njk
index 370c8aef1c..d3389f2d2e 100644
--- a/src/components/checkboxes/index.md.njk
+++ b/src/components/checkboxes/index.md.njk
@@ -6,6 +6,10 @@ aliases:
layout: layout-components.njk
---
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'checkboxes', example: 'default'}) }}
+
Let users select one or more options by using the Checkboxes component.
## When to use this component
@@ -21,11 +25,10 @@ Don’t use the Checkboxes component if users can only choose one option from a
## How it works
-There are two ways to use the Checkboxes component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert URL), you can use the Checkboxes macro.
+There are 2 ways to use the Checkboxes component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert URL), you can use the Checkboxes macro.
-[Live example with codeblock]
+{{ example({group: 'components', item: 'checkboxes', example: 'default', html: true, nunjucks: true, open: true}) }}
## Research on this component
Read a blog post about [updates to the Radios and Checkboxes components](https://designnotes.blog.gov.uk/2016/11/30/weve-updated-the-radios-and-checkboxes-on-gov-uk/).
-
diff --git a/src/components/date-input/default.md.njk b/src/components/date-input/default.njk
similarity index 74%
rename from src/components/date-input/default.md.njk
rename to src/components/date-input/default.njk
index 21562c4bfe..d817819ede 100644
--- a/src/components/date-input/default.md.njk
+++ b/src/components/date-input/default.njk
@@ -4,9 +4,9 @@ layout: layout-example.njk
{% from "date-input/macro.njk" import govukDateInput %}
-{{- govukDateInput({
+{{ govukDateInput({
fieldset: {
- legendText: 'What is your date of birth?',
+ legendHtml: '
What is your date of birth?
',
legendHintText: 'For example, 31 3 1980'
},
id: 'dob',
@@ -23,4 +23,4 @@ layout: layout-example.njk
}
]
})
--}}
\ No newline at end of file
+}}
diff --git a/src/components/date-input/error.md.njk b/src/components/date-input/error.njk
similarity index 77%
rename from src/components/date-input/error.md.njk
rename to src/components/date-input/error.njk
index efd405fb91..1183512a75 100644
--- a/src/components/date-input/error.md.njk
+++ b/src/components/date-input/error.njk
@@ -4,9 +4,9 @@ layout: layout-example.njk
{% from "date-input/macro.njk" import govukDateInput %}
-{{- govukDateInput({
+{{ govukDateInput({
fieldset: {
- legendText: 'What is your date of birth?',
+ legendHtml: '
What is your date of birth?
',
legendHintText: 'For example, 31 3 1980'
},
"errorMessage": {
@@ -26,4 +26,4 @@ layout: layout-example.njk
}
]
})
--}}
\ No newline at end of file
+}}
diff --git a/src/components/date-input/index.md.njk b/src/components/date-input/index.md.njk
index a26efd0c7a..8f93144659 100644
--- a/src/components/date-input/index.md.njk
+++ b/src/components/date-input/index.md.njk
@@ -26,7 +26,7 @@ Read more about how to [ask users for dates](Insert URL for Dates pattern).
The Date input component consists of 3 fields to let users enter a day, month and year.
-There are two ways to use the Date input component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert URL), you can use the Date input macro.
+There are 2 ways to use the Date input component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert URL), you can use the Date input macro.
{{ example({group: 'components', item: 'date-input', example: 'default', html: true, nunjucks: true, open: true}) }}
@@ -44,5 +44,3 @@ Check that a valid date is entered by the user. Invalid dates should be shown to
If you’ve used this pattern, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
More research is needed to determine the extent to which users struggle to enter months as numbers, and whether allowing them to enter months as text is helpful.
-
-
diff --git a/src/components/fieldset/address-group.njk b/src/components/fieldset/address-group.njk
new file mode 100644
index 0000000000..d28fbb67e4
--- /dev/null
+++ b/src/components/fieldset/address-group.njk
@@ -0,0 +1,34 @@
+---
+layout: layout-example.njk
+---
+
+
diff --git a/src/components/fieldset/default.njk b/src/components/fieldset/default.njk
new file mode 100644
index 0000000000..d1eeb0f16e
--- /dev/null
+++ b/src/components/fieldset/default.njk
@@ -0,0 +1,10 @@
+---
+layout: layout-example.njk
+---
+
+{% from "fieldset/macro.njk" import govukFieldset %}
+
+{{ govukFieldset({
+ "legendHtml": '
Legend text goes here
',
+ "legendHintText": "Legend hint text goes here"
+}) }}
diff --git a/src/components/fieldset/index.md.njk b/src/components/fieldset/index.md.njk
new file mode 100644
index 0000000000..2bc421ee18
--- /dev/null
+++ b/src/components/fieldset/index.md.njk
@@ -0,0 +1,35 @@
+---
+title: Fieldset
+description: Use the Fieldset component to group related form inputs.
+section: Components
+aliases:
+layout: layout-components.njk
+---
+
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'fieldset', example: 'default'}) }}
+
+Use the Fieldset component to group related form inputs.
+
+## When to use this component
+
+Use the Fieldset component when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single fieldset when [asking for an address](../../patterns/addresses).
+
+{{ example({group: 'components', item: 'fieldset', example: 'address-group', html: true, nunjucks: true, open: true}) }}
+
+If you’re using the examples or macros for [Radios](../radios), [Checkboxes](../checkboxes) or [Date input](../date-input), the fieldset will already be included.
+
+## How it works
+
+The first element inside a fieldset must be a `legend` which describes the group of inputs. This could be a question, such as ‘What is your current address?’ or a statement like ‘Personal details’.
+
+{{ example({group: 'components', item: 'fieldset', example: 'default', html: true, nunjucks: true, open: false}) }}
+
+On [Question pages](../../patterns/question-pages) containing a group of inputs, including the question as the legend helps users of screenreaders to understand that the inputs are all related to that question.
+
+Include any general help text which is important for filling in the form and can’t be written as [hint text](Link to hint text section of help users Fill in a form) in the legend, but try to keep it as concise as possible.
+
+## Research on this component
+
+If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
diff --git a/src/components/file-upload/default.md.njk b/src/components/file-upload/default.njk
similarity index 85%
rename from src/components/file-upload/default.md.njk
rename to src/components/file-upload/default.njk
index 8c84714542..dfb682c3de 100644
--- a/src/components/file-upload/default.md.njk
+++ b/src/components/file-upload/default.njk
@@ -4,11 +4,10 @@ layout: layout-example.njk
{% from "file-upload/macro.njk" import govukFileUpload %}
-{{- govukFileUpload({
+{{ govukFileUpload({
id: 'file-upload-1',
name: 'file-upload-1',
label: {
text: 'Upload a file'
}
-}) -}}
-
+}) }}
diff --git a/src/components/file-upload/index.md.njk b/src/components/file-upload/index.md.njk
index 1748f937fa..a7abfda46c 100644
--- a/src/components/file-upload/index.md.njk
+++ b/src/components/file-upload/index.md.njk
@@ -20,11 +20,10 @@ You should only ask users to upload something if it’s critical to the delivery
## How it works
-There are two ways to use the File upload component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the File upload macro.
+There are 2 ways to use the File upload component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the File upload macro.
{{ example({group: 'components', item: 'file-upload', example: 'default', html: true, nunjucks: true, open: true}) }}
## Research on this component
Read a blog post about [design tips for helping users upload things](https://designnotes.blog.gov.uk/2017/02/14/some-design-tips-for-uploading-things/).
-
diff --git a/src/components/panel/default.md.njk b/src/components/panel/default.njk
similarity index 98%
rename from src/components/panel/default.md.njk
rename to src/components/panel/default.njk
index 47ec079ef7..c12772cb9d 100644
--- a/src/components/panel/default.md.njk
+++ b/src/components/panel/default.njk
@@ -8,4 +8,4 @@ layout: layout-example.njk
"titleText": "Application complete",
"html": "Your reference number HDJ2123F"
})
-}}
\ No newline at end of file
+}}
diff --git a/src/components/panel/index.md.njk b/src/components/panel/index.md.njk
index a15cfd5d96..2cbb4ac67f 100644
--- a/src/components/panel/index.md.njk
+++ b/src/components/panel/index.md.njk
@@ -18,26 +18,20 @@ Use the Panel component to display important information when a transaction has
In most cases, the Panel component is used on [Confirmation pages](../../patterns/confirmation-pages), to tell the user they have successfully completed the transaction.
-
-
You can also use the Panel component in services that give users instant results, such as confirming the MOT status of a vehicle, to highlight the most important information on the page.
For example:
-
-
### When not to use
Don’t use the Panel component to highlight important information within body content. In this instance you should use the ‘Inset text’ component instead.
## How it works
-There are two ways to use the Panel component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the Panel macro.
+There are 2 ways to use the Panel component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the Panel macro.
{{ example({group: 'components', item: 'panel', example: 'default', html: true, nunjucks: true, open: true}) }}
## Research on this component
If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
-
-
diff --git a/src/components/phase-banner/beta.md.njk b/src/components/phase-banner/beta.njk
similarity index 100%
rename from src/components/phase-banner/beta.md.njk
rename to src/components/phase-banner/beta.njk
diff --git a/src/components/phase-banner/default.md.njk b/src/components/phase-banner/default.njk
similarity index 100%
rename from src/components/phase-banner/default.md.njk
rename to src/components/phase-banner/default.njk
diff --git a/src/components/phase-banner/index.md.njk b/src/components/phase-banner/index.md.njk
index 29ba0e45a3..097f8f0174 100644
--- a/src/components/phase-banner/index.md.njk
+++ b/src/components/phase-banner/index.md.njk
@@ -19,7 +19,8 @@ Use an alpha banner when your service is in alpha, and a beta banner if your ser
## How it works
Your banner must be directly under the black GOV.UK header and colour bar.
-There are two ways to use the Phase banner component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Phase banner macro.
+
+There are 2 ways to use the Phase banner component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Phase banner macro.
{{ example({group: 'components', item: 'phase-banner', example: 'default', html: true, nunjucks: true, open: true}) }}
diff --git a/src/components/radios/default.njk b/src/components/radios/default.njk
new file mode 100644
index 0000000000..a1b8da37e3
--- /dev/null
+++ b/src/components/radios/default.njk
@@ -0,0 +1,25 @@
+---
+layout: layout-example.njk
+---
+
+{% from 'radio/macro.njk' import govukRadio %}
+
+{{ govukRadio({
+ "idPrefix": "changed-name",
+ "name": "changed-name",
+ "fieldset": {
+ "legendHtml": '
Have you changed your name?
',
+ "legendHintText": "This includes changing your last name or spelling your name differently."
+ },
+ "items": [
+ {
+ "value": "yes",
+ "text": "Yes"
+ },
+ {
+ "value": "no",
+ "text": "No",
+ "checked": true
+ }
+ ]
+}) }}
diff --git a/src/components/radios/index.md.njk b/src/components/radios/index.md.njk
index 5438a75827..d1b65e0b1e 100644
--- a/src/components/radios/index.md.njk
+++ b/src/components/radios/index.md.njk
@@ -6,8 +6,9 @@ aliases:
layout: layout-components.njk
---
+{% from "_example.njk" import example %}
-[Example of radios]
+{{ example({group: 'components', item: 'radios', example: 'default'}) }}
## When to use this component
@@ -15,25 +16,24 @@ Use the Radios component when users can only select one option from a list.
### When not to use this component
-Don’t use the Radios component if users might need to select more than one option. In this case, you should use the [Checkboxes component](/components/checkboxes/] instead.
+Don’t use the Radios component if users might need to select more than one option. In this case, you should use the [Checkboxes component](/components/checkboxes/) instead.
## How it works
-There are two ways to use the Radios component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Radios macro.
+There are 2 ways to use the Radios component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Radios macro.
### Stacked radios
When there are more than two options, radios should be stacked, like so:
-[Example of stacked radios]
+{{ example({group: 'components', item: 'radios', example: 'default', html: true, nunjucks: true, open: true}) }}
-### Inline radios
+
## Research on this component
Read a blog post about updates to the [Radios and Checkboxes components](https://designnotes.blog.gov.uk/2016/11/30/weve-updated-the-radios-and-checkboxes-on-gov-uk/).
-
diff --git a/src/components/select/default.md.njk b/src/components/select/default.njk
similarity index 100%
rename from src/components/select/default.md.njk
rename to src/components/select/default.njk
diff --git a/src/components/select/index.md.njk b/src/components/select/index.md.njk
index 75df18e702..f1fe0f0286 100644
--- a/src/components/select/index.md.njk
+++ b/src/components/select/index.md.njk
@@ -22,12 +22,10 @@ Asking questions means you’re less likely to need to use the Select component,
If you’re unable to shorten the list, consider using the [Autocomplete](Insert URL) component.
-There are two ways to use the Select component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert URL), you can use the Select macro.
+There are 2 ways to use the Select component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert URL), you can use the Select macro.
{{ example({group: 'components', item: 'select', example: 'default', html: true, nunjucks: true, open: true}) }}
## Research on this component
Watch a video about how some [users struggle with selects](https://www.youtube.com/watch?v=CUkMCQR4TpY).
-
-
diff --git a/src/components/skip-link/default.njk b/src/components/skip-link/default.njk
new file mode 100644
index 0000000000..febeb602a1
--- /dev/null
+++ b/src/components/skip-link/default.njk
@@ -0,0 +1,11 @@
+---
+layout: layout-example.njk
+---
+
To view the Skip link component click inside this example and press tab
+
+{% from "skip-link/macro.njk" import govukSkipLink %}
+
+{{ govukSkipLink({
+ "text": "Skip to main content",
+ "href": "#content"
+}) }}
diff --git a/src/components/skip-link/index.md.njk b/src/components/skip-link/index.md.njk
new file mode 100644
index 0000000000..c8a0c3d807
--- /dev/null
+++ b/src/components/skip-link/index.md.njk
@@ -0,0 +1,33 @@
+---
+title: Skip link
+description: Use the Skip link component to help keyboard-only users skip to the main content on a page.
+section: Components
+aliases:
+layout: layout-components.njk
+---
+
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'skip-link', example: 'default'}) }}
+
+Use the Skip link component to help keyboard-only users skip to the main content on a page.
+
+## When to use this component
+
+All GOV.UK pages must have include a Skip link in the header.
+
+## How it works
+
+Some people use the tab key on their keyboard to navigate through the links and form elements on a web page.
+
+Including the Skip link component gives users the option to bypass the top-level navigation links and jump to the main content on a page.
+
+The Skip link component is visually hidden until a keyboard press activates it.
+
+There are 2 ways to use the Skip link component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Skip link macro.
+
+{{ example({group: 'components', item: 'skip-link', example: 'default', html: true, nunjucks: true, open: true}) }}
+
+## Research on this component
+
+If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
diff --git a/src/components/tag/default.md.njk b/src/components/tag/default.njk
similarity index 85%
rename from src/components/tag/default.md.njk
rename to src/components/tag/default.njk
index 471395d51f..30dc226f81 100644
--- a/src/components/tag/default.md.njk
+++ b/src/components/tag/default.njk
@@ -4,9 +4,8 @@ layout: layout-example.njk
{%- from "tag/macro.njk" import govukTag -%}
-{{- govukTag(
+{{ govukTag(
{
"text": "alpha"
})
--}}
-
+}}
diff --git a/src/components/tag/index.md.njk b/src/components/tag/index.md.njk
index 74eea15881..7e8046da33 100644
--- a/src/components/tag/index.md.njk
+++ b/src/components/tag/index.md.njk
@@ -16,13 +16,10 @@ Use the Tag component to indicate the status of something, such as an item on a
## How it works
-There are two ways to implement the Tag component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Tag macro.
+There are 2 ways to use the Tag component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](Insert prototype kit URL), you can use the Tag macro.
{{ example({group: 'components', item: 'tag', example: 'default', html: true, nunjucks: true, open: true}) }}
## Research on this component
If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
-
-
-
diff --git a/src/components/text-input/default.njk b/src/components/text-input/default.njk
new file mode 100644
index 0000000000..05779891b3
--- /dev/null
+++ b/src/components/text-input/default.njk
@@ -0,0 +1,13 @@
+---
+layout: layout-example.njk
+---
+{% from "input/macro.njk" import govukInput %}
+
+{{ govukInput({
+ "label": {
+ "text": "National insurance number",
+ "hintText": "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
+ },
+ id: "national-insurance-number",
+ name: "national-insurance-number"
+}) }}
diff --git a/src/components/text-input/index.md.njk b/src/components/text-input/index.md.njk
new file mode 100644
index 0000000000..9d38e5bae2
--- /dev/null
+++ b/src/components/text-input/index.md.njk
@@ -0,0 +1,45 @@
+---
+title: Text input
+description: Help users enter information with the Text input component.
+section: Components
+aliases:
+layout: layout-components.njk
+---
+
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'text-input', example: 'default'}) }}
+
+## When to use this component
+
+Use the Text input component when you need to let users enter text that’s no longer than a single line, such as their name or phone number.
+
+### When not to use this component
+
+Don’t use the Text input component if you need to let users enter longer answers that might span multiple lines. In this case, you should use the [Textarea component](Insert link for Textarea component.
+
+## How it works
+
+There are 2 ways to use the Text input component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the Text input macro.
+
+{{ example({group: 'components', item: 'text-input', example: 'default', html: true, nunjucks: true, open: true}) }}
+
+### Label text inputs
+
+All text inputs must have visible labels; placeholder text is not an acceptable replacement for a label as it vanishes when users click on the text input.
+
+Labels should be aligned above the text input they refer to. They should be short, direct and written in sentence case. Don’t use colons at the end of labels.
+
+### Use appropriately-sized text inputs
+
+Make text inputs the right size for the content they’re intended for. Postcode inputs should be postode-sized, telephone number inputs should be telephone number-sized.
+
+Ensure that users can still easily enter the information they need on smaller screens by snapping text inputs to 100% width at smaller screen sizes.
+
+### Don’t disable copy and paste
+
+Users often need to copy and paste information into a text input, so you shouldn’t prevent them from doing this.
+
+## Research on this component
+
+If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
diff --git a/src/components/textarea/default.njk b/src/components/textarea/default.njk
new file mode 100644
index 0000000000..f33abc3245
--- /dev/null
+++ b/src/components/textarea/default.njk
@@ -0,0 +1,13 @@
+---
+layout: layout-example.njk
+---
+{% from "textarea/macro.njk" import govukTextarea %}
+
+{{ govukTextarea({
+ "name": "more-detail",
+ "id": "more-detail",
+ "label": {
+ "text": "Can you provide more detail?",
+ "hintText": "Don't include personal or financial information, eg your National Insurance number or credit card details."
+ }
+}) }}
diff --git a/src/components/textarea/index.md.njk b/src/components/textarea/index.md.njk
new file mode 100644
index 0000000000..acffdb2191
--- /dev/null
+++ b/src/components/textarea/index.md.njk
@@ -0,0 +1,43 @@
+---
+title: Textarea
+description: Help users provide detailed information using the Textarea component.
+section: Components
+aliases:
+layout: layout-components.njk
+---
+
+{% from "_example.njk" import example %}
+
+{{ example({group: 'components', item: 'textarea', example: 'default'}) }}
+
+## When to use this component
+
+Use the Textarea component when you need to let users enter an amount of text that’s longer than a single line.
+
+### When not to use this component
+
+Don’t use the Textarea component if you need to let users enter shorter answers no longer than a single line, such as a phone number or name. In this case, you should use the [Text input component](../text-input).
+
+## How it works
+
+There are 2 ways to use the Textarea component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the GOV.UK Prototype Kit, you can use the Textarea macro.
+
+{{ example({group: 'components', item: 'textarea', example: 'default', html: true, nunjucks: true, open: true}) }}
+
+### Label textareas
+
+You must label textareas. Placeholder text is not a suitable substitute for a label, as it disappears when users click inside the textarea.
+
+Labels must be aligned above the textarea they refer to. They should be short, direct and written in sentence case. Don’t use colons at the end of labels.
+
+### Use appropriately-sized textareas
+
+Make the height of a textarea proportional to the amount of text you expect users to enter.
+
+### Don’t disable copy and paste
+
+Users will often need to copy and paste information into a textarea, so you shouldn’t prevent them from doing this.
+
+## Research on this component
+
+If you’ve used this component, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
diff --git a/src/patterns/addresses/index.md.njk b/src/patterns/addresses/index.md.njk
index 0610f59fc6..e139014031 100644
--- a/src/patterns/addresses/index.md.njk
+++ b/src/patterns/addresses/index.md.njk
@@ -7,6 +7,7 @@ aliases:
layout: layout-patterns.njk
---
+{% from "_example.njk" import example %}
Help users provide an address using one of the following:
@@ -16,8 +17,7 @@ Help users provide an address using one of the following:
## Address lookups
-Example
-[live example]
+![Address lookup](passports-address-lookup-1_.gif)
### When to use an address lookup
@@ -39,7 +39,7 @@ When using an address lookup, you should:
## Multiple text inputs
-[Live example of multiple text inputs]
+{{ example({group: 'patterns', item: 'addresses', example: 'multiple', html: true, nunjucks: true, open: false}) }}
### When to use multiple text inputs
@@ -72,7 +72,7 @@ Royal Mail doesn’t need a county as long as the town and postcode are included
## Text areas
-[Live example text area]
+{{ example({group: 'patterns', item: 'addresses', example: 'textarea', html: true, nunjucks: true, open: false}) }}
### When to use text areas
diff --git a/src/patterns/addresses/multiple.njk b/src/patterns/addresses/multiple.njk
new file mode 100644
index 0000000000..d28fbb67e4
--- /dev/null
+++ b/src/patterns/addresses/multiple.njk
@@ -0,0 +1,34 @@
+---
+layout: layout-example.njk
+---
+
+
diff --git a/src/patterns/addresses/passports-address-lookup-1_.gif b/src/patterns/addresses/passports-address-lookup-1_.gif
new file mode 100644
index 0000000000..9417eb252b
Binary files /dev/null and b/src/patterns/addresses/passports-address-lookup-1_.gif differ
diff --git a/src/patterns/addresses/textarea.njk b/src/patterns/addresses/textarea.njk
new file mode 100644
index 0000000000..e903eed36d
--- /dev/null
+++ b/src/patterns/addresses/textarea.njk
@@ -0,0 +1,14 @@
+---
+layout: layout-example.njk
+---
+
+
+{% from "textarea/macro.njk" import govukTextarea %}
+
+{{ govukTextarea({
+ "name": "address",
+ "id": "address",
+ "label": {
+ "text": "What is your address?"
+ }
+}) }}
diff --git a/src/patterns/check-a-service-is-suitable/index.md.njk b/src/patterns/check-a-service-is-suitable/index.md.njk
index 9a1b588a30..a754a7981b 100644
--- a/src/patterns/check-a-service-is-suitable/index.md.njk
+++ b/src/patterns/check-a-service-is-suitable/index.md.njk
@@ -7,7 +7,6 @@ aliases:
layout: layout-patterns.njk
---
-
Ask users questions to help them work out if they can or should use your service.
Doing this helps users save time as it tells them upfront whether they are eligible to use it and if they need it.
diff --git a/src/patterns/check-answers/index.md.njk b/src/patterns/check-answers/index.md.njk
index 564292b20d..d6bd2c9016 100644
--- a/src/patterns/check-answers/index.md.njk
+++ b/src/patterns/check-answers/index.md.njk
@@ -7,7 +7,6 @@ aliases:
layout: layout-patterns.njk
---
-
Let users check their answers before submitting information to a service.
![Check answers example](check-answers-page.png)
diff --git a/src/patterns/confirm-an-email-address/index.md.njk b/src/patterns/confirm-an-email-address/index.md.njk
index b880cb18e0..42a1122bba 100644
--- a/src/patterns/confirm-an-email-address/index.md.njk
+++ b/src/patterns/confirm-an-email-address/index.md.njk
@@ -7,7 +7,6 @@ aliases:
layout: layout-patterns.njk
---
-
Use an email confirmation loop to check that a user has access to a specific email account.
## When to use this pattern
diff --git a/src/patterns/confirmation-pages/default.md.njk b/src/patterns/confirmation-pages/default.md.njk
deleted file mode 100644
index 5a2b4ed2aa..0000000000
--- a/src/patterns/confirmation-pages/default.md.njk
+++ /dev/null
@@ -1,21 +0,0 @@
----
-layout: layout-example.njk
----
-
-{% from "panel/macro.njk" import govukPanel %}
-
-{{ govukPanel({
- "titleText": "Application complete",
- "html": "Your reference number HDJ2123F"
-})
-}}
-
-
We have sent you a confirmation email.
-
-
What happens next
-
-
We've sent your application to Hackney Electoral Register Office.
-
-
They will contact you either to confirm your registration, or to ask for more information.
diff --git a/src/patterns/confirmation-pages/index.md.njk b/src/patterns/confirmation-pages/index.md.njk
index 6479791581..46124a0155 100644
--- a/src/patterns/confirmation-pages/index.md.njk
+++ b/src/patterns/confirmation-pages/index.md.njk
@@ -9,7 +9,6 @@ layout: layout-patterns.njk
{% from "_example.njk" import example %}
-
Let users know they’ve completed a transaction.
{{ example({group: 'patterns', item: 'confirmation-pages', example: 'default'}) }}
@@ -45,4 +44,4 @@ If you can’t, make sure your service responds in a helpful way when users retu
## Research on this pattern
-Read a blog post about users who bookmark confirmation pages.
\ No newline at end of file
+Read a blog post about users who bookmark confirmation pages.
diff --git a/src/patterns/create-a-username/index.md.njk b/src/patterns/create-a-username/index.md.njk
index ba9646483a..6afb4bf607 100644
--- a/src/patterns/create-a-username/index.md.njk
+++ b/src/patterns/create-a-username/index.md.njk
@@ -7,7 +7,6 @@ aliases:
layout: layout-patterns.njk
---
-
Help users to create a unique and memorable username to sign into a service with.
## When to use this pattern
diff --git a/src/patterns/create-accounts/index.md.njk b/src/patterns/create-accounts/index.md.njk
index b1a6122993..2c9a84cb0e 100644
--- a/src/patterns/create-accounts/index.md.njk
+++ b/src/patterns/create-accounts/index.md.njk
@@ -7,7 +7,6 @@ aliases:
layout: layout-patterns.njk
---
-
Help users create an account for your service.
## When to use this pattern
diff --git a/src/patterns/dates/default.njk b/src/patterns/dates/default.njk
new file mode 100644
index 0000000000..d817819ede
--- /dev/null
+++ b/src/patterns/dates/default.njk
@@ -0,0 +1,26 @@
+---
+layout: layout-example.njk
+---
+
+{% from "date-input/macro.njk" import govukDateInput %}
+
+{{ govukDateInput({
+ fieldset: {
+ legendHtml: '
What is your date of birth?
',
+ legendHintText: 'For example, 31 3 1980'
+ },
+ id: 'dob',
+ name: 'dob',
+ items:[
+ {
+ name: 'day'
+ },
+ {
+ name: 'month'
+ },
+ {
+ name: 'year'
+ }
+ ]
+ })
+}}
diff --git a/src/patterns/dates/index.md.njk b/src/patterns/dates/index.md.njk
new file mode 100644
index 0000000000..df9c77acdc
--- /dev/null
+++ b/src/patterns/dates/index.md.njk
@@ -0,0 +1,83 @@
+---
+title: Dates
+description: Help users enter or select a date.
+section: Patterns
+theme: Ask users for...
+aliases:
+layout: layout-patterns.njk
+---
+
+{% from "_example.njk" import example %}
+
+Help users enter or select a date.
+
+{{ example({group: 'patterns', item: 'dates', example: 'default'}) }}
+
+## When to use this pattern
+
+Follow this pattern whenever you need users to provide or select a date as part of your service.
+
+## How it works
+
+The way you should ask users for dates depends on the types of date you’re asking for.
+
+Dates you may need, include:
+- memorable dates - like a date of birth or marriage
+- dates from documents or cards - like a passport or credit card
+- approximate dates - like ‘December 2017’
+- relative dates - like ‘4 days from today’
+
+In some cases, you might need users to pick a date.
+
+### Asking for memorable dates
+
+Ask for memorable dates, like dates of birth using the [Date input component](../../components/date-input).
+
+{{ example({group: 'patterns', item: 'dates', example: 'default', html: true, nunjucks: true, open: false}) }}
+
+### Asking for dates from documents and cards
+
+When asking for a date exactly as it’s shown on a passport, credit card or other document, make the fields match the format of the original. This makes it easier for users to copy the date across accurately.
+
+### Asking for approximate dates
+
+Allow users to enter an approximate date when you are asking them for information they may not know or struggle to remember. For example, allow users to enter ‘December 2017’ for a field that says ‘the date you lost your passport’.
+
+### Asking for relative dates
+
+You may need to ask for dates that are relative to today’s date or another date - this is common if a user is setting a reminder.
+
+To do this let users enter or select relative dates like ‘tomorrow’ or ‘1 day before’. If the day of the week is important, show this as well.
+
+### Helping users to pick a date
+
+Users might need to pick a date from a selection, for example, to book an appointment.
+
+To do this, you can present dates in a calendar format using a calendar control. Users are typically shown one month’s worth of dates at a time, and can skip through months and years.
+
+Only use a calendar control if users need to:
+
+- pick a date in the near future or recent past
+- know the day of the week - or the week of the month - as well as the date
+- be able to see dates in relation to other dates
+
+Never make a calendar control that depends on JavaScript as the only input option. Allow users to enter the date into a Textarea as well as use the control.
+
+### How to check that dates are valid
+
+To check that the dates users give you are valid, make sure that:
+
+- it’s a real date, for example, not 54 July
+- past dates are in the past
+- future dates are in the future
+- the first date in a date range is before the second
+
+### How to write dates
+
+See the [GOV.UK style for writing dates](https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style#dates) and [date ranges]( https://www.gov.uk/guidance/content-design/writing-for-gov-uk#date-ranges).
+
+## Research on this pattern
+
+If you’ve used this pattern, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
+
+More research is needed to determine the extent to which users struggle to enter months as numbers, and whether allowing them to enter months as text is helpful.
diff --git a/src/patterns/email-addresses/default.md.njk b/src/patterns/email-addresses/default.njk
similarity index 84%
rename from src/patterns/email-addresses/default.md.njk
rename to src/patterns/email-addresses/default.njk
index 9019c356dc..faa69df42d 100644
--- a/src/patterns/email-addresses/default.md.njk
+++ b/src/patterns/email-addresses/default.njk
@@ -9,7 +9,6 @@ layout: layout-example.njk
"text": "Email address",
"hintText": "We'll only use this to send you a receipt"
},
- id: "input-1",
- name: "test-name"
+ id: "email",
+ name: "email"
}) }}
-
diff --git a/src/patterns/fill-in-a-form/details.md.njk b/src/patterns/fill-in-a-form/details.njk
similarity index 78%
rename from src/patterns/fill-in-a-form/details.md.njk
rename to src/patterns/fill-in-a-form/details.njk
index 602032618a..9c698cc6fe 100644
--- a/src/patterns/fill-in-a-form/details.md.njk
+++ b/src/patterns/fill-in-a-form/details.njk
@@ -4,8 +4,8 @@ layout: layout-example.njk
{% from "details/macro.njk" import govukDetails %}
-{{- govukDetails({
- "summary": "Help with nationality",
+{{ govukDetails({
+ "summaryText": "Help with nationality",
"text": "If you’re not sure about your nationality, try to find out from an official document like a passport or national ID card."
})
--}}
+}}
diff --git a/src/patterns/national-insurance-numbers/default.md.njk b/src/patterns/fill-in-a-form/hint.njk
similarity index 80%
rename from src/patterns/national-insurance-numbers/default.md.njk
rename to src/patterns/fill-in-a-form/hint.njk
index dba8a68280..aa35d87f8f 100644
--- a/src/patterns/national-insurance-numbers/default.md.njk
+++ b/src/patterns/fill-in-a-form/hint.njk
@@ -9,7 +9,6 @@ layout: layout-example.njk
"text": "National Insurance Number",
"hintText": "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
},
- id: "input-1",
- name: "test-name"
+ id: "national-insurance-number",
+ name: "national-insurance-number"
}) }}
-
diff --git a/src/patterns/fill-in-a-form/index.md.njk b/src/patterns/fill-in-a-form/index.md.njk
index 374ba2085e..d3f2b38719 100644
--- a/src/patterns/fill-in-a-form/index.md.njk
+++ b/src/patterns/fill-in-a-form/index.md.njk
@@ -111,8 +111,35 @@ Use the Details component to make your page easier to scan, but don’t hide hel
Make sure the link text is written so that users can quickly work out if they need to click on it.
+
+
+
+### Using progress indicators
+
+Start by testing your form without a progress indicator to see if it’s simple enough that users don’t need them.
+
+Try improving the order, type or number of questions before adding a progress indicator. If people still have difficulty, try adding a simple step or question indicator like this one.
+
+{{ example({group: 'patterns', item: 'fill-in-a-form', example: 'progress', html: true, nunjucks: true, open: false}) }}
+
+Only include the total number of questions if you can do so reliably. As the user moves through the form, make sure the indicator updates to tell them which question they are on and the total number remaining.
+
+Don’t use this type of progress indicator:
+
+![Horizontal progress indicator](progress_indicators_horizontal.png)
+
+These can be problematic because they:
+- are often not noticed
+- take up lots of space
+- don’t scale well on small screens
+- can distract and confuse some users
+- make it hard to write good labels for the steps
+- make it hard to handle conditional sections
+
+A number of GOV.UK services have removed this style of progress indicator without any negative effects.
+Read a blog post about [how the Carer’s Allowance team removed a 12-step progress indicator](https://designnotes.blog.gov.uk/2014/07/07/do-less-problems-as-shared-spaces/) with no effect on completion rates or times.
+
+
## Research on this pattern
Learn more about the [question protocol](https://www.uxmatters.com/mt/archives/2010/06/the-question-protocol-how-to-make-sure-every-form-field-is-necessary.php).
Read a blog post about how the [‘Register to vote’ service used forms](https://designnotes.blog.gov.uk/2014/07/14/things-we-learnt-designing-register-to-vote/).
-
-
diff --git a/src/patterns/fill-in-a-form/progress.njk b/src/patterns/fill-in-a-form/progress.njk
new file mode 100644
index 0000000000..c74ec32c6c
--- /dev/null
+++ b/src/patterns/fill-in-a-form/progress.njk
@@ -0,0 +1,8 @@
+---
+layout: layout-example.njk
+---
+
+
+ Question 3 of 9
+ Your details
+
diff --git a/src/patterns/fill-in-a-form/progress_indicators_horizontal.png b/src/patterns/fill-in-a-form/progress_indicators_horizontal.png
new file mode 100644
index 0000000000..3db4ff3fe3
Binary files /dev/null and b/src/patterns/fill-in-a-form/progress_indicators_horizontal.png differ
diff --git a/src/patterns/names/default.md.njk b/src/patterns/names/default.njk
similarity index 78%
rename from src/patterns/names/default.md.njk
rename to src/patterns/names/default.njk
index 7055ce6f97..80635770c9 100644
--- a/src/patterns/names/default.md.njk
+++ b/src/patterns/names/default.njk
@@ -8,6 +8,6 @@ layout: layout-example.njk
label: {
"text": "Full name"
},
- id: "input-1",
- name: "test-name"
+ id: "full-name",
+ name: "full-name"
}) }}
diff --git a/src/patterns/fill-in-a-form/hint.md.njk b/src/patterns/national-insurance-numbers/default.njk
similarity index 78%
rename from src/patterns/fill-in-a-form/hint.md.njk
rename to src/patterns/national-insurance-numbers/default.njk
index 1242d92669..aa35d87f8f 100644
--- a/src/patterns/fill-in-a-form/hint.md.njk
+++ b/src/patterns/national-insurance-numbers/default.njk
@@ -9,6 +9,6 @@ layout: layout-example.njk
"text": "National Insurance Number",
"hintText": "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
},
- id: "input-1",
- name: "test-name"
-}) }}
\ No newline at end of file
+ id: "national-insurance-number",
+ name: "national-insurance-number"
+}) }}
diff --git a/src/patterns/passwords/index.md.njk b/src/patterns/passwords/index.md.njk
index 4558bce320..6db037739b 100644
--- a/src/patterns/passwords/index.md.njk
+++ b/src/patterns/passwords/index.md.njk
@@ -112,4 +112,3 @@ You shouldn’t use password reminders because they:
If you’ve used this pattern, [get in touch](Anchor link to Get in touch panel at bottom of page) to share your user research findings.
[Read the National Cyber Security Centre’s guidance on passwords](https://www.ncsc.gov.uk/index/guidance?f%5B0%5D=field_topics%253Aname%3AIdentity%20and%20passwords).
-
diff --git a/src/patterns/question-pages/default.njk b/src/patterns/question-pages/default.njk
new file mode 100644
index 0000000000..6b1aa78499
--- /dev/null
+++ b/src/patterns/question-pages/default.njk
@@ -0,0 +1,42 @@
+---
+layout: layout-example.njk
+---
+
+{% from "back-link/macro.njk" import govukBackLink %}
+{% from "date-input/macro.njk" import govukDateInput %}
+{% from "button/macro.njk" import govukButton %}
+
+{{ govukBackLink({
+ "text": "Back"
+}) }}
+
+
diff --git a/src/patterns/question-pages/index.md.njk b/src/patterns/question-pages/index.md.njk
index ee887c917e..84a0f8c49e 100644
--- a/src/patterns/question-pages/index.md.njk
+++ b/src/patterns/question-pages/index.md.njk
@@ -7,8 +7,9 @@ aliases:
layout: layout-patterns.njk
---
+{% from "_example.njk" import example %}
-[Example of a question page]
+{{ example({group: 'patterns', item: 'question-pages', example: 'default', html: true, nunjucks: true, open: false}) }}
## When to use this pattern
@@ -34,25 +35,27 @@ Make sure the back link takes users to the previous page and that it still works
### Page headings
-
Page headings can be statements or questions.
If you’re only asking for one piece of information on a page, make the question the page heading.
For example ‘What is your home postcode?’
+{{ example({group: 'patterns', item: 'question-pages', example: 'postcode', html: true, nunjucks: true, open: false}) }}
If you need to ask for multiple related things on a page, use a statement as the heading.
This example uses ‘Passport details’ to describe the related questions:
+{{ example({group: 'patterns', item: 'question-pages', example: 'passport', html: true, nunjucks: true, open: false}) }}
+
Don’t duplicate the same page heading across multiple pages.
The page heading should relate specifically to the information being asked for on the current page, not any higher-level section the page is part of.
If you need to show the high-level section, you can use the 'secondary-heading' style. For example, ‘About you’:
-
+{{ example({group: 'patterns', item: 'question-pages', example: 'section-headings', html: true, nunjucks: true, open: false}) }}
### Continue button
diff --git a/src/patterns/question-pages/passport.njk b/src/patterns/question-pages/passport.njk
new file mode 100644
index 0000000000..e331893687
--- /dev/null
+++ b/src/patterns/question-pages/passport.njk
@@ -0,0 +1,53 @@
+---
+layout: layout-example.njk
+---
+
+{% from "back-link/macro.njk" import govukBackLink %}
+{% from "input/macro.njk" import govukInput %}
+{% from "date-input/macro.njk" import govukDateInput %}
+{% from "button/macro.njk" import govukButton %}
+
+{{ govukBackLink({
+ "text": "Back"
+}) }}
+
+
diff --git a/src/styles/typography/index.md.njk b/src/styles/typography/index.md.njk
new file mode 100644
index 0000000000..e6cf28f3b1
--- /dev/null
+++ b/src/styles/typography/index.md.njk
@@ -0,0 +1,120 @@
+---
+title: Typography
+description: GOV.UK Typography
+section: Styles
+layout: layout-styles.njk
+---
+
+{% from "_example.njk" import example %}
+
+## Font
+
+If your service is on the service.gov.uk sub-domain you must use the GDS Transport Website font.
+
+You should use an alternative typeface like Helvetica or Arial for services publicly available on different domains
+
+If you’re not sure whether you should be using GDS Transport, read the Service manual guide on [making your service look like GOV.UK](https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk) or [contact the Design System team](Insert anchor link to Get in touch panel at bottom of page).
+
+## Headings
+
+Use headings consistently to create a clear hierarchy throughout your service.
+
+Markup headings semantically using the appropriate level HTML element and use the corresponding heading class to apply the GOV.UK styling.
+
+Write all headings in sentence case.
+
+{{ example({group: 'styles', item: 'typography', example: 'headings', html: true, nunjucks: true, open: true}) }}
+
+### Headings with captions
+
+Sometimes you may need to make it clear that a heading is part of a larger section or group. You can use a heading with a caption, for this.
+
+{{ example({group: 'styles', item: 'typography', example: 'captions', html: true, nunjucks: true, open: false}) }}
+
+## Paragraphs
+
+### Body
+
+The default paragraph font-size is 19px on large screens and 16px on small screens.
+
+{{ example({group: 'styles', item: 'typography', example: 'body', html: true, nunjucks: true, open: false}) }}
+
+You can also add classes to create lead paragraphs and smaller body copy to convey hierarchy in your page.
+
+### Lead paragraph
+
+A lead paragraph is an introductory paragraph that you can use to summarise the content of the page below. Lead paragraphs use 24px type on desktop and should only be used once per page if needed.
+
+{{ example({group: 'styles', item: 'typography', example: 'lead', html: true, nunjucks: true, open: false}) }}
+
+### Body small
+
+You can use the body small class to make your paragraph font size smaller: 16px on larger screens and 14px on smaller screens.
+
+Generally, you should only use body small for supporting content like the ‘Related items’ navigation on GOV.UK. Use body small sparingly.
+
+The majority of your body copy should use the standard 19px paragraph size.
+
+{{ example({group: 'styles', item: 'typography', example: 'small', html: true, nunjucks: true, open: false}) }}
+
+## Font override classes and typography mixins
+
+You might need to set the font size or font weight of an element outside of the predefined heading and paragraph classes. For this you can use the font utility classes in your HTML or reference the typography mixins in your own components.
+
+### Font size
+
+The full GOV.UK typography scale goes from 14px up to 80px on large screens. You can add these font-size override classes to any other typographic class or element and they will change the font size.
+
+{{ example({group: 'styles', item: 'typography', example: 'font-size', html: true, nunjucks: true, open: false}) }}
+
+### Font weight
+
+As with the font size, you can add a font-weight override class to any other typographic class or element to change the font weight to regular or bold weight.
+
+{{ example({group: 'styles', item: 'typography', example: 'font-weight', html: true, nunjucks: true, open: false}) }}
+
+## Links
+
+Links are blue and underlined by default. If your link is at the end of a sentence or paragraph, make sure that the linked text doesn’t include the full stop.
+
+{{ example({group: 'styles', item: 'typography', example: 'link', html: true, nunjucks: true, open: false}) }}
+
+## Lists
+
+Use lists to make blocks of text easier to read, and to break information into smaller, manageable chunks.
+
+{{ example({group: 'styles', item: 'typography', example: 'list', html: true, nunjucks: true, open: false}) }}
+
+### Bulleted lists
+
+Introduce bulleted lists with a lead in line ending in a colon. Start each item with a lowercase letter, and don’t use a full stop at the end.
+
+{{ example({group: 'styles', item: 'typography', example: 'list-bullet', html: true, nunjucks: true, open: false}) }}
+
+### Numbered lists
+
+Use numbered lists instead of bulleted lists when the order of the items is relevant.
+
+You don’t need to use a lead-in line for numbered lists. Items in a numbered list should end in a full stop because each should be a complete sentence.
+
+{{ example({group: 'styles', item: 'typography', example: 'list-number', html: true, nunjucks: true, open: false}) }}
+
+## Prose scope
+
+You can use the govuk-prose-scope class to apply GOV.UK styles to a block of text. This means you don’t need to apply classes to the individual elements.
+
+Prose scope is designed to be used with text content only. Don’t use it to style a section containing other elements, for example form inputs.
+
+govuk-prose-scope will apply GOV.UK styles to:
+
+- headings
+- paragraphs
+- bold text
+- lists
+
+{{ example({group: 'styles', item: 'typography', example: 'prose-scope', html: true, nunjucks: true, open: false}) }}
+
+
+
+
+
diff --git a/src/styles/typography/lead.njk b/src/styles/typography/lead.njk
new file mode 100644
index 0000000000..a552844206
--- /dev/null
+++ b/src/styles/typography/lead.njk
@@ -0,0 +1,5 @@
+---
+layout: layout-example.njk
+---
+
+
A paragraph. This includes even more text to give a good representation of a more average length paragraph. That way you can see more than one line wrapping.
+
+
H2 heading
+
+
A paragraph. This includes even more text to give a good representation of a more average length paragraph. That way you can see more than one line wrapping.