govuk_fe_assets 0.1.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +6 -0
- data/govuk_fe_assets.gemspec +26 -0
- data/lib/govuk_fe_assets.rb +5 -0
- data/lib/govuk_fe_assets/version.rb +3 -0
- data/node_modules/govuk-frontend/README.md +96 -0
- data/node_modules/govuk-frontend/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/all.js +1720 -0
- data/node_modules/govuk-frontend/all.scss +11 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
- data/node_modules/govuk-frontend/common.js +39 -0
- data/node_modules/govuk-frontend/components/_all.scss +26 -0
- data/node_modules/govuk-frontend/components/back-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/back-link/_back-link.scss +54 -0
- data/node_modules/govuk-frontend/components/back-link/back-link.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +335 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/_breadcrumbs.scss +119 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +14 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +13 -0
- data/node_modules/govuk-frontend/components/button/README.md +319 -0
- data/node_modules/govuk-frontend/components/button/_button.scss +185 -0
- data/node_modules/govuk-frontend/components/button/button.js +548 -0
- data/node_modules/govuk-frontend/components/button/button.njk +3 -0
- data/node_modules/govuk-frontend/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/button/template.njk +35 -0
- data/node_modules/govuk-frontend/components/checkboxes/README.md +782 -0
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +151 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +730 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +27 -0
- data/node_modules/govuk-frontend/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/checkboxes/template.njk +86 -0
- data/node_modules/govuk-frontend/components/date-input/README.md +640 -0
- data/node_modules/govuk-frontend/components/date-input/_date-input.scss +35 -0
- data/node_modules/govuk-frontend/components/date-input/date-input.njk +23 -0
- data/node_modules/govuk-frontend/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/date-input/template.njk +76 -0
- data/node_modules/govuk-frontend/components/details/README.md +237 -0
- data/node_modules/govuk-frontend/components/details/_details.scss +86 -0
- data/node_modules/govuk-frontend/components/details/details.js +836 -0
- data/node_modules/govuk-frontend/components/details/details.njk +7 -0
- data/node_modules/govuk-frontend/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/components/error-message/README.md +143 -0
- data/node_modules/govuk-frontend/components/error-message/_error-message.scss +15 -0
- data/node_modules/govuk-frontend/components/error-message/error-message.njk +7 -0
- data/node_modules/govuk-frontend/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-message/template.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/README.md +215 -0
- data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +68 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.js +520 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +17 -0
- data/node_modules/govuk-frontend/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/components/fieldset/README.md +213 -0
- data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +58 -0
- data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +13 -0
- data/node_modules/govuk-frontend/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/fieldset/template.njk +17 -0
- data/node_modules/govuk-frontend/components/file-upload/README.md +332 -0
- data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +19 -0
- data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +9 -0
- data/node_modules/govuk-frontend/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/file-upload/template.njk +42 -0
- data/node_modules/govuk-frontend/components/footer/README.md +284 -0
- data/node_modules/govuk-frontend/components/footer/_footer.scss +216 -0
- data/node_modules/govuk-frontend/components/footer/footer.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/template.njk +80 -0
- data/node_modules/govuk-frontend/components/header/README.md +524 -0
- data/node_modules/govuk-frontend/components/header/_header.scss +285 -0
- data/node_modules/govuk-frontend/components/header/header.js +717 -0
- data/node_modules/govuk-frontend/components/header/header.njk +3 -0
- data/node_modules/govuk-frontend/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/header/template.njk +82 -0
- data/node_modules/govuk-frontend/components/hint/README.md +157 -0
- data/node_modules/govuk-frontend/components/hint/_hint.scss +29 -0
- data/node_modules/govuk-frontend/components/hint/hint.njk +7 -0
- data/node_modules/govuk-frontend/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/components/input/README.md +416 -0
- data/node_modules/govuk-frontend/components/input/_input.scss +62 -0
- data/node_modules/govuk-frontend/components/input/input.njk +9 -0
- data/node_modules/govuk-frontend/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/input/template.njk +42 -0
- data/node_modules/govuk-frontend/components/inset-text/README.md +157 -0
- data/node_modules/govuk-frontend/components/inset-text/_inset-text.scss +28 -0
- data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +7 -0
- data/node_modules/govuk-frontend/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/components/label/README.md +193 -0
- data/node_modules/govuk-frontend/components/label/_label.scss +45 -0
- data/node_modules/govuk-frontend/components/label/label.njk +6 -0
- data/node_modules/govuk-frontend/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/components/panel/README.md +151 -0
- data/node_modules/govuk-frontend/components/panel/_panel.scss +42 -0
- data/node_modules/govuk-frontend/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/panel/panel.njk +7 -0
- data/node_modules/govuk-frontend/components/panel/template.njk +12 -0
- data/node_modules/govuk-frontend/components/phase-banner/README.md +152 -0
- data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +31 -0
- data/node_modules/govuk-frontend/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +7 -0
- data/node_modules/govuk-frontend/components/phase-banner/template.njk +17 -0
- data/node_modules/govuk-frontend/components/radios/README.md +686 -0
- data/node_modules/govuk-frontend/components/radios/_radios.scss +157 -0
- data/node_modules/govuk-frontend/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/radios/radios.js +730 -0
- data/node_modules/govuk-frontend/components/radios/radios.njk +27 -0
- data/node_modules/govuk-frontend/components/radios/template.njk +85 -0
- data/node_modules/govuk-frontend/components/select/README.md +387 -0
- data/node_modules/govuk-frontend/components/select/_select.scss +35 -0
- data/node_modules/govuk-frontend/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/select/select.njk +24 -0
- data/node_modules/govuk-frontend/components/select/template.njk +44 -0
- data/node_modules/govuk-frontend/components/skip-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/skip-link/_skip-link.scss +15 -0
- data/node_modules/govuk-frontend/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/components/table/README.md +585 -0
- data/node_modules/govuk-frontend/components/table/_table.scss +50 -0
- data/node_modules/govuk-frontend/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/table/table.njk +45 -0
- data/node_modules/govuk-frontend/components/table/template.njk +39 -0
- data/node_modules/govuk-frontend/components/tabs/README.md +375 -0
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +120 -0
- data/node_modules/govuk-frontend/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.js +1302 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/template.njk +29 -0
- data/node_modules/govuk-frontend/components/tag/README.md +150 -0
- data/node_modules/govuk-frontend/components/tag/_tag.scss +23 -0
- data/node_modules/govuk-frontend/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tag/tag.njk +7 -0
- data/node_modules/govuk-frontend/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/README.md +350 -0
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +31 -0
- data/node_modules/govuk-frontend/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/template.njk +41 -0
- data/node_modules/govuk-frontend/components/textarea/textarea.njk +11 -0
- data/node_modules/govuk-frontend/components/warning-text/README.md +148 -0
- data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +50 -0
- data/node_modules/govuk-frontend/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +9 -0
- data/node_modules/govuk-frontend/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/core/_global-styles.scss +19 -0
- data/node_modules/govuk-frontend/core/_links.scss +40 -0
- data/node_modules/govuk-frontend/core/_lists.scss +63 -0
- data/node_modules/govuk-frontend/core/_section-break.scss +56 -0
- data/node_modules/govuk-frontend/core/_template.scss +16 -0
- data/node_modules/govuk-frontend/core/_typography.scss +186 -0
- data/node_modules/govuk-frontend/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/helpers/_colour.scss +51 -0
- data/node_modules/govuk-frontend/helpers/_device-pixels.scss +38 -0
- data/node_modules/govuk-frontend/helpers/_focusable.scss +34 -0
- data/node_modules/govuk-frontend/helpers/_font-faces.scss +67 -0
- data/node_modules/govuk-frontend/helpers/_grid.scss +100 -0
- data/node_modules/govuk-frontend/helpers/_links.scss +149 -0
- data/node_modules/govuk-frontend/helpers/_media-queries.scss +95 -0
- data/node_modules/govuk-frontend/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/helpers/_spacing.scss +152 -0
- data/node_modules/govuk-frontend/helpers/_typography.scss +153 -0
- data/node_modules/govuk-frontend/helpers/_visually-hidden.scss +76 -0
- data/node_modules/govuk-frontend/objects/_all.scss +4 -0
- data/node_modules/govuk-frontend/objects/_form-group.scss +21 -0
- data/node_modules/govuk-frontend/objects/_grid.scss +10 -0
- data/node_modules/govuk-frontend/objects/_main-wrapper.scss +37 -0
- data/node_modules/govuk-frontend/objects/_width-container.scss +28 -0
- data/node_modules/govuk-frontend/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/overrides/_display.scss +14 -0
- data/node_modules/govuk-frontend/overrides/_spacing.scss +58 -0
- data/node_modules/govuk-frontend/overrides/_typography.scss +21 -0
- data/node_modules/govuk-frontend/overrides/_width.scss +41 -0
- data/node_modules/govuk-frontend/package.json +50 -0
- data/node_modules/govuk-frontend/settings/_all.scss +21 -0
- data/node_modules/govuk-frontend/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/settings/_colours-applied.scss +130 -0
- data/node_modules/govuk-frontend/settings/_colours-organisations.scss +136 -0
- data/node_modules/govuk-frontend/settings/_colours-palette.scss +37 -0
- data/node_modules/govuk-frontend/settings/_compatibility.scss +51 -0
- data/node_modules/govuk-frontend/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/settings/_measurements.scss +85 -0
- data/node_modules/govuk-frontend/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/settings/_typography-font-families.scss +22 -0
- data/node_modules/govuk-frontend/settings/_typography-font.scss +48 -0
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +138 -0
- data/node_modules/govuk-frontend/template.njk +56 -0
- data/node_modules/govuk-frontend/tools/_all.scss +7 -0
- data/node_modules/govuk-frontend/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/tools/_font-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/tools/_iff.scss +15 -0
- data/node_modules/govuk-frontend/tools/_image-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/vendor/_sass-mq.scss +351 -0
- data/node_modules/govuk-frontend/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +449 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Window.js +28 -0
- data/package-lock.json +10 -0
- data/package.json +5 -0
- metadata +334 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@import "../tag/tag";
|
6
|
+
|
7
|
+
@include govuk-exports("govuk/component/phase-banner") {
|
8
|
+
.govuk-phase-banner {
|
9
|
+
@include govuk-font($size: 16);
|
10
|
+
@include govuk-text-colour;
|
11
|
+
|
12
|
+
padding-top: govuk-spacing(2);
|
13
|
+
padding-bottom: govuk-spacing(2);
|
14
|
+
|
15
|
+
border-bottom: 1px solid $govuk-border-colour;
|
16
|
+
}
|
17
|
+
|
18
|
+
.govuk-phase-banner__content {
|
19
|
+
display: table;
|
20
|
+
margin: 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
.govuk-phase-banner__content__tag {
|
24
|
+
margin-right: govuk-spacing(2);
|
25
|
+
}
|
26
|
+
|
27
|
+
.govuk-phase-banner__text {
|
28
|
+
display: table-cell;
|
29
|
+
vertical-align: baseline;
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{% from "../tag/macro.njk" import govukTag -%}
|
2
|
+
|
3
|
+
<div class="govuk-phase-banner
|
4
|
+
{%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
5
|
+
<p class="govuk-phase-banner__content">
|
6
|
+
{{- govukTag(
|
7
|
+
{
|
8
|
+
"text": params.tag.text,
|
9
|
+
"html": params.tag.html,
|
10
|
+
"classes": "govuk-phase-banner__content__tag " + (params.tag.classes if params.tag.classes)
|
11
|
+
}
|
12
|
+
) -}}
|
13
|
+
<span class="govuk-phase-banner__text">
|
14
|
+
{{ params.html | safe if params.html else params.text }}
|
15
|
+
</span>
|
16
|
+
</p>
|
17
|
+
</div>
|
@@ -0,0 +1,686 @@
|
|
1
|
+
# Radios
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
Let users select a single option from a list.
|
6
|
+
|
7
|
+
## Guidance
|
8
|
+
|
9
|
+
Find out when to use the Radios component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/radios).
|
10
|
+
|
11
|
+
## Quick start examples
|
12
|
+
|
13
|
+
### Component default
|
14
|
+
|
15
|
+
[Preview the radios component](http://govuk-frontend-review.herokuapp.com/components/radios/preview)
|
16
|
+
|
17
|
+
#### Markup
|
18
|
+
|
19
|
+
<div class="govuk-form-group">
|
20
|
+
|
21
|
+
<fieldset class="govuk-fieldset" aria-describedby="example-hint">
|
22
|
+
|
23
|
+
<legend class="govuk-fieldset__legend">
|
24
|
+
Have you changed your name?
|
25
|
+
</legend>
|
26
|
+
|
27
|
+
<span id="example-hint" class="govuk-hint">
|
28
|
+
This includes changing your last name or spelling your name differently.
|
29
|
+
</span>
|
30
|
+
|
31
|
+
<div class="govuk-radios">
|
32
|
+
|
33
|
+
<div class="govuk-radios__item">
|
34
|
+
<input class="govuk-radios__input" id="example-1" name="example" type="radio" value="yes">
|
35
|
+
<label class="govuk-label govuk-radios__label" for="example-1">
|
36
|
+
Yes
|
37
|
+
</label>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="govuk-radios__item">
|
41
|
+
<input class="govuk-radios__input" id="example-2" name="example" type="radio" value="no" checked>
|
42
|
+
<label class="govuk-label govuk-radios__label" for="example-2">
|
43
|
+
No
|
44
|
+
</label>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
</div>
|
48
|
+
</fieldset>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
|
52
|
+
#### Macro
|
53
|
+
|
54
|
+
{% from 'radios/macro.njk' import govukRadios %}
|
55
|
+
|
56
|
+
{{ govukRadios({
|
57
|
+
"idPrefix": "example",
|
58
|
+
"name": "example",
|
59
|
+
"fieldset": {
|
60
|
+
"legend": {
|
61
|
+
"text": "Have you changed your name?"
|
62
|
+
}
|
63
|
+
},
|
64
|
+
"hint": {
|
65
|
+
"text": "This includes changing your last name or spelling your name differently."
|
66
|
+
},
|
67
|
+
"items": [
|
68
|
+
{
|
69
|
+
"value": "yes",
|
70
|
+
"text": "Yes"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"value": "no",
|
74
|
+
"text": "No",
|
75
|
+
"checked": true
|
76
|
+
}
|
77
|
+
]
|
78
|
+
}) }}
|
79
|
+
|
80
|
+
### Radios--inline
|
81
|
+
|
82
|
+
[Preview the radios--inline example](http://govuk-frontend-review.herokuapp.com/components/radios/inline/preview)
|
83
|
+
|
84
|
+
#### Markup
|
85
|
+
|
86
|
+
<div class="govuk-form-group">
|
87
|
+
|
88
|
+
<fieldset class="govuk-fieldset" aria-describedby="example-hint">
|
89
|
+
|
90
|
+
<legend class="govuk-fieldset__legend">
|
91
|
+
Have you changed your name?
|
92
|
+
</legend>
|
93
|
+
|
94
|
+
<span id="example-hint" class="govuk-hint">
|
95
|
+
This includes changing your last name or spelling your name differently.
|
96
|
+
</span>
|
97
|
+
|
98
|
+
<div class="govuk-radios govuk-radios--inline">
|
99
|
+
|
100
|
+
<div class="govuk-radios__item">
|
101
|
+
<input class="govuk-radios__input" id="example-1" name="example" type="radio" value="yes">
|
102
|
+
<label class="govuk-label govuk-radios__label" for="example-1">
|
103
|
+
Yes
|
104
|
+
</label>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div class="govuk-radios__item">
|
108
|
+
<input class="govuk-radios__input" id="example-2" name="example" type="radio" value="no" checked>
|
109
|
+
<label class="govuk-label govuk-radios__label" for="example-2">
|
110
|
+
No
|
111
|
+
</label>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
</div>
|
115
|
+
</fieldset>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
#### Macro
|
120
|
+
|
121
|
+
{% from 'radios/macro.njk' import govukRadios %}
|
122
|
+
|
123
|
+
{{ govukRadios({
|
124
|
+
"idPrefix": "example",
|
125
|
+
"classes": "govuk-radios--inline",
|
126
|
+
"name": "example",
|
127
|
+
"fieldset": {
|
128
|
+
"legend": {
|
129
|
+
"text": "Have you changed your name?"
|
130
|
+
}
|
131
|
+
},
|
132
|
+
"hint": {
|
133
|
+
"text": "This includes changing your last name or spelling your name differently."
|
134
|
+
},
|
135
|
+
"items": [
|
136
|
+
{
|
137
|
+
"value": "yes",
|
138
|
+
"text": "Yes"
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"value": "no",
|
142
|
+
"text": "No",
|
143
|
+
"checked": true
|
144
|
+
}
|
145
|
+
]
|
146
|
+
}) }}
|
147
|
+
|
148
|
+
### Radios--with-disabled
|
149
|
+
|
150
|
+
[Preview the radios--with-disabled example](http://govuk-frontend-review.herokuapp.com/components/radios/with-disabled/preview)
|
151
|
+
|
152
|
+
#### Markup
|
153
|
+
|
154
|
+
<div class="govuk-form-group">
|
155
|
+
|
156
|
+
<fieldset class="govuk-fieldset" aria-describedby="example-disabled-hint">
|
157
|
+
|
158
|
+
<legend class="govuk-fieldset__legend">
|
159
|
+
Have you changed your name?
|
160
|
+
</legend>
|
161
|
+
|
162
|
+
<span id="example-disabled-hint" class="govuk-hint">
|
163
|
+
This includes changing your last name or spelling your name differently.
|
164
|
+
</span>
|
165
|
+
|
166
|
+
<div class="govuk-radios">
|
167
|
+
|
168
|
+
<div class="govuk-radios__item">
|
169
|
+
<input class="govuk-radios__input" id="example-disabled-1" name="example-disabled" type="radio" value="yes" disabled>
|
170
|
+
<label class="govuk-label govuk-radios__label" for="example-disabled-1">
|
171
|
+
Yes
|
172
|
+
</label>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div class="govuk-radios__item">
|
176
|
+
<input class="govuk-radios__input" id="example-disabled-2" name="example-disabled" type="radio" value="no" disabled>
|
177
|
+
<label class="govuk-label govuk-radios__label" for="example-disabled-2">
|
178
|
+
No
|
179
|
+
</label>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
</div>
|
183
|
+
</fieldset>
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
#### Macro
|
188
|
+
|
189
|
+
{% from 'radios/macro.njk' import govukRadios %}
|
190
|
+
|
191
|
+
{{ govukRadios({
|
192
|
+
"idPrefix": "example-disabled",
|
193
|
+
"name": "example-disabled",
|
194
|
+
"fieldset": {
|
195
|
+
"legend": {
|
196
|
+
"text": "Have you changed your name?"
|
197
|
+
}
|
198
|
+
},
|
199
|
+
"hint": {
|
200
|
+
"text": "This includes changing your last name or spelling your name differently."
|
201
|
+
},
|
202
|
+
"items": [
|
203
|
+
{
|
204
|
+
"value": "yes",
|
205
|
+
"text": "Yes",
|
206
|
+
"disabled": true
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"value": "no",
|
210
|
+
"text": "No",
|
211
|
+
"disabled": true
|
212
|
+
}
|
213
|
+
]
|
214
|
+
}) }}
|
215
|
+
|
216
|
+
### Radios--with-html
|
217
|
+
|
218
|
+
[Preview the radios--with-html example](http://govuk-frontend-review.herokuapp.com/components/radios/with-html/preview)
|
219
|
+
|
220
|
+
#### Markup
|
221
|
+
|
222
|
+
<div class="govuk-form-group">
|
223
|
+
|
224
|
+
<fieldset class="govuk-fieldset" aria-describedby="housing-act-hint">
|
225
|
+
|
226
|
+
<legend class="govuk-fieldset__legend">
|
227
|
+
<h1 class="govuk-heading-l">Which part of the Housing Act was your licence issued under?</h1>
|
228
|
+
</legend>
|
229
|
+
|
230
|
+
<span id="housing-act-hint" class="govuk-hint">
|
231
|
+
Select one of the options below.
|
232
|
+
</span>
|
233
|
+
|
234
|
+
<div class="govuk-radios">
|
235
|
+
|
236
|
+
<div class="govuk-radios__item">
|
237
|
+
<input class="govuk-radios__input" id="housing-act-1" name="housing-act" type="radio" value="part-2">
|
238
|
+
<label class="govuk-label govuk-radios__label" for="housing-act-1">
|
239
|
+
<span class="govuk-heading-s govuk-!-margin-bottom-1">Part 2 of the Housing Act 2004</span> For properties that are 3 or more stories high and occupied by 5 or more people
|
240
|
+
</label>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div class="govuk-radios__item">
|
244
|
+
<input class="govuk-radios__input" id="housing-act-2" name="housing-act" type="radio" value="part-3">
|
245
|
+
<label class="govuk-label govuk-radios__label" for="housing-act-2">
|
246
|
+
<span class="govuk-heading-s govuk-!-margin-bottom-1">Part 3 of the Housing Act 2004</span> For properties that are within a geographical area defined by a local council
|
247
|
+
</label>
|
248
|
+
</div>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
</fieldset>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
#### Macro
|
256
|
+
|
257
|
+
{% from 'radios/macro.njk' import govukRadios %}
|
258
|
+
|
259
|
+
{{ govukRadios({
|
260
|
+
"idPrefix": "housing-act",
|
261
|
+
"name": "housing-act",
|
262
|
+
"fieldset": {
|
263
|
+
"legend": {
|
264
|
+
"html": "<h1 class=\"govuk-heading-l\">Which part of the Housing Act was your licence issued under?</h1>"
|
265
|
+
}
|
266
|
+
},
|
267
|
+
"hint": {
|
268
|
+
"text": "Select one of the options below."
|
269
|
+
},
|
270
|
+
"items": [
|
271
|
+
{
|
272
|
+
"value": "part-2",
|
273
|
+
"html": "<span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 2 of the Housing Act 2004</span> For properties that are 3 or more stories high and occupied by 5 or more people"
|
274
|
+
},
|
275
|
+
{
|
276
|
+
"value": "part-3",
|
277
|
+
"html": "<span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 3 of the Housing Act 2004</span> For properties that are within a geographical area defined by a local council"
|
278
|
+
}
|
279
|
+
]
|
280
|
+
}) }}
|
281
|
+
|
282
|
+
### Radios--without-fieldset
|
283
|
+
|
284
|
+
[Preview the radios--without-fieldset example](http://govuk-frontend-review.herokuapp.com/components/radios/without-fieldset/preview)
|
285
|
+
|
286
|
+
#### Markup
|
287
|
+
|
288
|
+
<div class="govuk-form-group">
|
289
|
+
|
290
|
+
<div class="govuk-radios">
|
291
|
+
|
292
|
+
<div class="govuk-radios__item">
|
293
|
+
<input class="govuk-radios__input" id="colours-1" name="colours" type="radio" value="red">
|
294
|
+
<label class="govuk-label govuk-radios__label" for="colours-1">
|
295
|
+
Red
|
296
|
+
</label>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div class="govuk-radios__item">
|
300
|
+
<input class="govuk-radios__input" id="colours-2" name="colours" type="radio" value="green">
|
301
|
+
<label class="govuk-label govuk-radios__label" for="colours-2">
|
302
|
+
Green
|
303
|
+
</label>
|
304
|
+
</div>
|
305
|
+
|
306
|
+
<div class="govuk-radios__item">
|
307
|
+
<input class="govuk-radios__input" id="colours-3" name="colours" type="radio" value="blue">
|
308
|
+
<label class="govuk-label govuk-radios__label" for="colours-3">
|
309
|
+
Blue
|
310
|
+
</label>
|
311
|
+
</div>
|
312
|
+
|
313
|
+
</div>
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
#### Macro
|
318
|
+
|
319
|
+
{% from 'radios/macro.njk' import govukRadios %}
|
320
|
+
|
321
|
+
{{ govukRadios({
|
322
|
+
"name": "colours",
|
323
|
+
"items": [
|
324
|
+
{
|
325
|
+
"value": "red",
|
326
|
+
"text": "Red"
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"value": "green",
|
330
|
+
"text": "Green"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"value": "blue",
|
334
|
+
"text": "Blue"
|
335
|
+
}
|
336
|
+
]
|
337
|
+
}) }}
|
338
|
+
|
339
|
+
### Radios--with-extreme-fieldset
|
340
|
+
|
341
|
+
[Preview the radios--with-extreme-fieldset example](http://govuk-frontend-review.herokuapp.com/components/radios/with-extreme-fieldset/preview)
|
342
|
+
|
343
|
+
#### Markup
|
344
|
+
|
345
|
+
<div class="govuk-form-group govuk-form-group--error">
|
346
|
+
|
347
|
+
<fieldset class="govuk-fieldset app-fieldset--custom-modifier" aria-describedby="example-hint example-error" data-attribute="value" data-second-attribute="second-value">
|
348
|
+
|
349
|
+
<legend class="govuk-fieldset__legend">
|
350
|
+
Have you changed your name?
|
351
|
+
</legend>
|
352
|
+
|
353
|
+
<span id="example-hint" class="govuk-hint">
|
354
|
+
This includes changing your last name or spelling your name differently.
|
355
|
+
</span>
|
356
|
+
|
357
|
+
<span id="example-error" class="govuk-error-message">
|
358
|
+
Please select an option
|
359
|
+
</span>
|
360
|
+
|
361
|
+
<div class="govuk-radios">
|
362
|
+
|
363
|
+
<div class="govuk-radios__item">
|
364
|
+
<input class="govuk-radios__input" id="example-1" name="example" type="radio" value="yes">
|
365
|
+
<label class="govuk-label govuk-radios__label" for="example-1">
|
366
|
+
Yes
|
367
|
+
</label>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
<div class="govuk-radios__item">
|
371
|
+
<input class="govuk-radios__input" id="example-2" name="example" type="radio" value="no" checked>
|
372
|
+
<label class="govuk-label govuk-radios__label" for="example-2">
|
373
|
+
No
|
374
|
+
</label>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
</div>
|
378
|
+
</fieldset>
|
379
|
+
|
380
|
+
</div>
|
381
|
+
|
382
|
+
#### Macro
|
383
|
+
|
384
|
+
{% from 'radios/macro.njk' import govukRadios %}
|
385
|
+
|
386
|
+
{{ govukRadios({
|
387
|
+
"idPrefix": "example",
|
388
|
+
"name": "example",
|
389
|
+
"errorMessage": {
|
390
|
+
"text": "Please select an option"
|
391
|
+
},
|
392
|
+
"fieldset": {
|
393
|
+
"classes": "app-fieldset--custom-modifier",
|
394
|
+
"attributes": {
|
395
|
+
"data-attribute": "value",
|
396
|
+
"data-second-attribute": "second-value"
|
397
|
+
},
|
398
|
+
"legend": {
|
399
|
+
"text": "Have you changed your name?"
|
400
|
+
}
|
401
|
+
},
|
402
|
+
"hint": {
|
403
|
+
"text": "This includes changing your last name or spelling your name differently."
|
404
|
+
},
|
405
|
+
"items": [
|
406
|
+
{
|
407
|
+
"value": "yes",
|
408
|
+
"text": "Yes"
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"value": "no",
|
412
|
+
"text": "No",
|
413
|
+
"checked": true
|
414
|
+
}
|
415
|
+
]
|
416
|
+
}) }}
|
417
|
+
|
418
|
+
## Requirements
|
419
|
+
|
420
|
+
### Build tool configuration
|
421
|
+
|
422
|
+
When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp
|
423
|
+
|
424
|
+
.pipe(sass({
|
425
|
+
includePaths: 'node_modules/'
|
426
|
+
}))
|
427
|
+
|
428
|
+
### Static asset path configuration
|
429
|
+
|
430
|
+
In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js:
|
431
|
+
|
432
|
+
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
433
|
+
|
434
|
+
## Component arguments
|
435
|
+
|
436
|
+
If you are using Nunjucks,then macros take the following arguments
|
437
|
+
|
438
|
+
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
439
|
+
|
440
|
+
<table class="govuk-table">
|
441
|
+
|
442
|
+
<thead class="govuk-table__head">
|
443
|
+
|
444
|
+
<tr class="govuk-table__row">
|
445
|
+
|
446
|
+
<th class="govuk-table__header" scope="col">Name</th>
|
447
|
+
|
448
|
+
<th class="govuk-table__header" scope="col">Type</th>
|
449
|
+
|
450
|
+
<th class="govuk-table__header" scope="col">Required</th>
|
451
|
+
|
452
|
+
<th class="govuk-table__header" scope="col">Description</th>
|
453
|
+
|
454
|
+
</tr>
|
455
|
+
|
456
|
+
</thead>
|
457
|
+
|
458
|
+
<tbody class="govuk-table__body">
|
459
|
+
|
460
|
+
<tr class="govuk-table__row">
|
461
|
+
|
462
|
+
<th class="govuk-table__header" scope="row">fieldset</th>
|
463
|
+
|
464
|
+
<td class="govuk-table__cell ">object</td>
|
465
|
+
|
466
|
+
<td class="govuk-table__cell ">No</td>
|
467
|
+
|
468
|
+
<td class="govuk-table__cell ">Arguments for the fieldset component (e.g. legend). See fieldset component.</td>
|
469
|
+
|
470
|
+
</tr>
|
471
|
+
|
472
|
+
<tr class="govuk-table__row">
|
473
|
+
|
474
|
+
<th class="govuk-table__header" scope="row">hint</th>
|
475
|
+
|
476
|
+
<td class="govuk-table__cell ">object</td>
|
477
|
+
|
478
|
+
<td class="govuk-table__cell ">No</td>
|
479
|
+
|
480
|
+
<td class="govuk-table__cell ">Arguments for the hint component (e.g. text). See hint component.</td>
|
481
|
+
|
482
|
+
</tr>
|
483
|
+
|
484
|
+
<tr class="govuk-table__row">
|
485
|
+
|
486
|
+
<th class="govuk-table__header" scope="row">errorMessage</th>
|
487
|
+
|
488
|
+
<td class="govuk-table__cell ">object</td>
|
489
|
+
|
490
|
+
<td class="govuk-table__cell ">No</td>
|
491
|
+
|
492
|
+
<td class="govuk-table__cell ">Arguments for the errorMessage component (e.g. text). See errorMessage component.</td>
|
493
|
+
|
494
|
+
</tr>
|
495
|
+
|
496
|
+
<tr class="govuk-table__row">
|
497
|
+
|
498
|
+
<th class="govuk-table__header" scope="row">idPrefix</th>
|
499
|
+
|
500
|
+
<td class="govuk-table__cell ">string</td>
|
501
|
+
|
502
|
+
<td class="govuk-table__cell ">No</td>
|
503
|
+
|
504
|
+
<td class="govuk-table__cell ">String to prefix id for each radio item if no id is specified on each item. If`idPrefix` is not passed, fallback to using the name attribute instead.</td>
|
505
|
+
|
506
|
+
</tr>
|
507
|
+
|
508
|
+
<tr class="govuk-table__row">
|
509
|
+
|
510
|
+
<th class="govuk-table__header" scope="row">name</th>
|
511
|
+
|
512
|
+
<td class="govuk-table__cell ">string</td>
|
513
|
+
|
514
|
+
<td class="govuk-table__cell ">Yes</td>
|
515
|
+
|
516
|
+
<td class="govuk-table__cell ">Name attribute for each radio item.</td>
|
517
|
+
|
518
|
+
</tr>
|
519
|
+
|
520
|
+
<tr class="govuk-table__row">
|
521
|
+
|
522
|
+
<th class="govuk-table__header" scope="row">items</th>
|
523
|
+
|
524
|
+
<td class="govuk-table__cell ">array</td>
|
525
|
+
|
526
|
+
<td class="govuk-table__cell ">Yes</td>
|
527
|
+
|
528
|
+
<td class="govuk-table__cell ">Array of checkbox items objects.</td>
|
529
|
+
|
530
|
+
</tr>
|
531
|
+
|
532
|
+
<tr class="govuk-table__row">
|
533
|
+
|
534
|
+
<th class="govuk-table__header" scope="row">items.{}.text (or) items.{}.html</th>
|
535
|
+
|
536
|
+
<td class="govuk-table__cell ">string</td>
|
537
|
+
|
538
|
+
<td class="govuk-table__cell ">Yes</td>
|
539
|
+
|
540
|
+
<td class="govuk-table__cell ">Text or HTML to use within each radio item label. If `html` is provided, the `text` argument will be ignored.</td>
|
541
|
+
|
542
|
+
</tr>
|
543
|
+
|
544
|
+
<tr class="govuk-table__row">
|
545
|
+
|
546
|
+
<th class="govuk-table__header" scope="row">items.{}.id</th>
|
547
|
+
|
548
|
+
<td class="govuk-table__cell ">string</td>
|
549
|
+
|
550
|
+
<td class="govuk-table__cell ">No</td>
|
551
|
+
|
552
|
+
<td class="govuk-table__cell ">Specific id attribute for the radio item. If ommited, then `idPrefix` string will be applied.</td>
|
553
|
+
|
554
|
+
</tr>
|
555
|
+
|
556
|
+
<tr class="govuk-table__row">
|
557
|
+
|
558
|
+
<th class="govuk-table__header" scope="row">items.{}.name</th>
|
559
|
+
|
560
|
+
<td class="govuk-table__cell ">string</td>
|
561
|
+
|
562
|
+
<td class="govuk-table__cell ">Yes</td>
|
563
|
+
|
564
|
+
<td class="govuk-table__cell ">Specific name for the radio item. If ommited, then component global `name` string will be applied.</td>
|
565
|
+
|
566
|
+
</tr>
|
567
|
+
|
568
|
+
<tr class="govuk-table__row">
|
569
|
+
|
570
|
+
<th class="govuk-table__header" scope="row">items.{}.value</th>
|
571
|
+
|
572
|
+
<td class="govuk-table__cell ">string</td>
|
573
|
+
|
574
|
+
<td class="govuk-table__cell ">Yes</td>
|
575
|
+
|
576
|
+
<td class="govuk-table__cell ">Value for the radio input.</td>
|
577
|
+
|
578
|
+
</tr>
|
579
|
+
|
580
|
+
<tr class="govuk-table__row">
|
581
|
+
|
582
|
+
<th class="govuk-table__header" scope="row">items.{}.label</th>
|
583
|
+
|
584
|
+
<td class="govuk-table__cell ">object</td>
|
585
|
+
|
586
|
+
<td class="govuk-table__cell ">No</td>
|
587
|
+
|
588
|
+
<td class="govuk-table__cell ">Provide additional attributes to each radio item label. See `label` component for more details.</td>
|
589
|
+
|
590
|
+
</tr>
|
591
|
+
|
592
|
+
<tr class="govuk-table__row">
|
593
|
+
|
594
|
+
<th class="govuk-table__header" scope="row">items.{}.checked</th>
|
595
|
+
|
596
|
+
<td class="govuk-table__cell ">boolean</td>
|
597
|
+
|
598
|
+
<td class="govuk-table__cell ">No</td>
|
599
|
+
|
600
|
+
<td class="govuk-table__cell ">If true, radio will be checked.</td>
|
601
|
+
|
602
|
+
</tr>
|
603
|
+
|
604
|
+
<tr class="govuk-table__row">
|
605
|
+
|
606
|
+
<th class="govuk-table__header" scope="row">items.{}.conditional</th>
|
607
|
+
|
608
|
+
<td class="govuk-table__cell ">boolean</td>
|
609
|
+
|
610
|
+
<td class="govuk-table__cell ">No</td>
|
611
|
+
|
612
|
+
<td class="govuk-table__cell ">If true, content provided will be revealed when the item is checked.</td>
|
613
|
+
|
614
|
+
</tr>
|
615
|
+
|
616
|
+
<tr class="govuk-table__row">
|
617
|
+
|
618
|
+
<th class="govuk-table__header" scope="row">items.{}.conditional.html</th>
|
619
|
+
|
620
|
+
<td class="govuk-table__cell ">boolean</td>
|
621
|
+
|
622
|
+
<td class="govuk-table__cell ">No</td>
|
623
|
+
|
624
|
+
<td class="govuk-table__cell ">Provide content for the conditional reveal.</td>
|
625
|
+
|
626
|
+
</tr>
|
627
|
+
|
628
|
+
<tr class="govuk-table__row">
|
629
|
+
|
630
|
+
<th class="govuk-table__header" scope="row">items.{}.disabled</th>
|
631
|
+
|
632
|
+
<td class="govuk-table__cell ">boolean</td>
|
633
|
+
|
634
|
+
<td class="govuk-table__cell ">No</td>
|
635
|
+
|
636
|
+
<td class="govuk-table__cell ">If true, radio will be disabled.</td>
|
637
|
+
|
638
|
+
</tr>
|
639
|
+
|
640
|
+
<tr class="govuk-table__row">
|
641
|
+
|
642
|
+
<th class="govuk-table__header" scope="row">classes</th>
|
643
|
+
|
644
|
+
<td class="govuk-table__cell ">string</td>
|
645
|
+
|
646
|
+
<td class="govuk-table__cell ">No</td>
|
647
|
+
|
648
|
+
<td class="govuk-table__cell ">Optional additional classes to add to the radios container.</td>
|
649
|
+
|
650
|
+
</tr>
|
651
|
+
|
652
|
+
<tr class="govuk-table__row">
|
653
|
+
|
654
|
+
<th class="govuk-table__header" scope="row">attributes</th>
|
655
|
+
|
656
|
+
<td class="govuk-table__cell ">object</td>
|
657
|
+
|
658
|
+
<td class="govuk-table__cell ">No</td>
|
659
|
+
|
660
|
+
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the radios container.</td>
|
661
|
+
|
662
|
+
</tr>
|
663
|
+
|
664
|
+
</tbody>
|
665
|
+
|
666
|
+
</table>
|
667
|
+
|
668
|
+
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
669
|
+
|
670
|
+
### Setting up Nunjucks views and paths
|
671
|
+
|
672
|
+
Below is an example setup using express configure views:
|
673
|
+
|
674
|
+
nunjucks.configure('node_modules/govuk-frontend/components', {
|
675
|
+
autoescape: true,
|
676
|
+
cache: false,
|
677
|
+
express: app
|
678
|
+
})
|
679
|
+
|
680
|
+
## Contribution
|
681
|
+
|
682
|
+
Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository")
|
683
|
+
|
684
|
+
## License
|
685
|
+
|
686
|
+
MIT
|