Group
<ul class="asp-grid">
<li class="asp-grid__item asp-grid__item--medium-one-half asp-grid__item--large-one-third asp-group">
<h2 class="asp-group__title">Group 1</h2>
<ol class="asp-group__list">
<li class="asp-group__item">
<a class="asp-group__link" href="#">Group 1, sub link a</a>
</li>
<li class="asp-group__item">
<a class="asp-group__link" href="#">Group 1, sub link b</a>
</li>
<li class="asp-group__item">
<a class="asp-group__link" href="#">Group 1, sub link c</a>
</li>
</ol>
</li>
<li class="asp-grid__item asp-grid__item--medium-one-half asp-grid__item--large-one-third asp-group">
<h2 class="asp-group__title">Group 2</h2>
<ol class="asp-group__list">
<li class="asp-group__item">
<a class="asp-group__link" href="#">Group 2, sub link a</a>
</li>
<li class="asp-group__item">
<a class="asp-group__link" href="#">Group 2, sub link b</a>
</li>
</ol>
</li>
</ul>
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. Object of each group list. See
Options for rows
Name | Type | Description |
---|---|---|
title | string | Required. The group list title. |
rows | array | rows. | Required. A list of links and text group. See
Options for rows
Name | Type | Description |
---|---|---|
href | string | Required. The URL of group item. |
text | string | Required. The text of group item. |
{% from "group/macro.njk" import aspGroup %}
{{ aspGroup({
rows: [
{
title: "Group 1",
rows: [
{
text: "Group 1, sub link a",
href: "#"
},
{
text: "Group 1, sub link b",
href: "#"
},
{
text: "Group 1, sub link c",
href: "#"
}
]
},
{
title: "Group 2",
rows: [
{
text: "Group 2, sub link a",
href: "#"
},
{
text: "Group 2, sub link b",
href: "#"
}
]
}
]
}) }}
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. Object of each group list. See
Options for rows
Name | Type | Description |
---|---|---|
title | string | Required. The group list title. |
rows | array | rows. | Required. A list of links and text group. See
Options for rows
Name | Type | Description |
---|---|---|
href | string | Required. The URL of group item. |
text | string | Required. The text of group item. |
{% from "group/macro.njk" import aspGroup %}
{{ aspGroup({
rows: [
{
title: "Group 1",
rows: [
{
text: "Group 1, sub link a",
href: "#"
},
{
text: "Group 1, sub link b",
href: "#"
},
{
text: "Group 1, sub link c",
href: "#"
}
]
},
{
title: "Group 2",
rows: [
{
text: "Group 2, sub link a",
href: "#"
},
{
text: "Group 2, sub link b",
href: "#"
}
]
}
]
}) }}
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 | Completed |
HTML / Nunjucks version | Completed |
Figma version | Not started |
M365 versions | Not started |
Documentation | In progress |
Published 12 June 2024
Last updated 11 September 2024