Progress
<div class="asp-progress">
<div class="asp-progress__single asp-progress__single--complete">
<div class="asp-progress__single-content">
<span class="asp-progress__single-icon asp-progress__single-icon--complete"></span>
<div class="asp-progress__single-title">Step 1 title</div>
<div class="asp-progress__single-content">
<p>Step 1 content (text).</p>
<p>With additional line. modifier: complete</p>
</div>
</div>
</div>
<div class="asp-progress__single asp-progress__single--failed">
<div class="asp-progress__single-content">
<span class="asp-progress__single-icon asp-progress__single-icon--failed"></span>
<div class="asp-progress__single-title">Step 2 title</div>
<div class="asp-progress__single-content">
<p>Step 2 content (html) with <a href="#">link</a>. modifier: failed</p>
</div>
</div>
</div>
<div class="asp-progress__single asp-progress__single--in-progress">
<div class="asp-progress__single-content">
<span class="asp-progress__single-icon asp-progress__single-icon--in-progress"></span>
<div class="asp-progress__single-title">Step 3 title</div>
<div class="asp-progress__single-content">
Step 3 content (text). modifier: in-progress
</div>
</div>
</div>
</div>
Nunjucks macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
Name | Type | Description |
---|---|---|
rows | object | rows. | Required. The stages within the progress component. See
Options for rows
Name | Type | Description |
---|---|---|
modifier | string | Required. Default values are 'in-progress', 'complete' or 'failed'. |
title | string | Required. The progress stage title. |
content | array | content. | Required. The progress stage content. See
Options for content
Name | Type | Description |
---|---|---|
html | string | Required. HTML for the progress stage content. If 'html' is provided, the 'text' parameter will be ignored. |
text | string | Required. Text for the progress stage content. If 'html' is provided, the 'text' parameter will be ignored. |
{% from "progress/macro.njk" import aspProgress %}
{{ aspProgress({
rows: [
{
modifier: "complete",
title: "Step 1 title",
content: {
html: '<p>Step 1 content (text).</p>
<p>With additional line. modifier: complete</p>'
}
},
{
modifier: "failed",
title: "Step 2 title",
content: {
html: '<p>Step 2 content (html) with <a href="#">link</a>. modifier: failed</p>'
}
},
{
modifier: "in-progress",
title: "Step 3 title",
content: {
text: "Step 3 content (text). modifier: in-progress"
}
}
]
}) }}
Twig macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
Name | Type | Description |
---|---|---|
rows | object | rows. | Required. The stages within the progress component. See
Options for rows
Name | Type | Description |
---|---|---|
modifier | string | Required. Default values are 'in-progress', 'complete' or 'failed'. |
title | string | Required. The progress stage title. |
content | array | content. | Required. The progress stage content. See
Options for content
Name | Type | Description |
---|---|---|
html | string | Required. HTML for the progress stage content. If 'html' is provided, the 'text' parameter will be ignored. |
text | string | Required. Text for the progress stage content. If 'html' is provided, the 'text' parameter will be ignored. |
{% from "progress/macro.njk" import aspProgress %}
{{ aspProgress({
rows: [
{
modifier: "complete",
title: "Step 1 title",
content: {
html: '<p>Step 1 content (text).</p>
<p>With additional line. modifier: complete</p>'
}
},
{
modifier: "failed",
title: "Step 2 title",
content: {
html: '<p>Step 2 content (html) with <a href="#">link</a>. modifier: failed</p>'
}
},
{
modifier: "in-progress",
title: "Step 3 title",
content: {
text: "Step 3 content (text). modifier: in-progress"
}
}
]
}) }}
Alias
Previously known as a steps component on the ‘frontend’.
Status of development
The below criteria all need to be met for a component to be considered as fully developed for use within the ASP Digital Design System.
Development criteria | Status |
---|---|
WCAG 2.2 compliant | Not started |
WCAG 2.1 compliant | Failing |
HTML / Nunjucks version | Completed |
Figma version | Not started |
M365 versions | Not started |
Documentation | In progress |
Published 3 May 2024
Last updated 10 December 2024