Skip to content

Your web browser is out of date

Your web browser (the software you use to access the internet) is out of date. You need to update it or use a different web browser to ensure you can complete this form.

Cookies disabled

Cookies are currently not enabled in your web browser. You need to enable cookies to ensure you can complete this form.

Alert

Copy code: alert

<div class="asp-alert" role="region">
  <div class="asp-container">
      <p>Last import - 9 September 2025 12:34</p>
  </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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ content: { text: "Last import - 9 September 2025 12:34" } }) }}

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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ content: { text: "Last import - 9 September 2025 12:34" } }) }}

Copy code: alert

<div class="asp-alert asp-alert--green" role="region">
  <div class="asp-container">
      <p>Last import - 9 September 2025 12:34</p>
  </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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "green", content: { text: "Last import - 9 September 2025 12:34" } }) }}

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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "green", content: { text: "Last import - 9 September 2025 12:34" } }) }}

Copy code: alert

<div class="asp-alert asp-alert--amber" role="region">
  <div class="asp-container">
      <p>Last import - 9 September 2025 12:34</p>
  </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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "amber", content: { text: "Last import - 9 September 2025 12:34" } }) }}

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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "amber", content: { text: "Last import - 9 September 2025 12:34" } }) }}

Copy code: alert

<div class="asp-alert asp-alert--red" role="region">
  <div class="asp-container">
      <p><strong>Last import</strong>: 9 September 2025 12:34 - see <a href="#">advisory note</a></p>
  </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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "red", content: { html: "<p><strong>Last import</strong>: 9 September 2025 12:34 - see <a href=</span>"#">advisory note</a></p>" } }) }}

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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "red", content: { html: "<p><strong>Last import</strong>: 9 September 2025 12:34 - see <a href=</span>"#">advisory note</a></p>" } }) }}

Copy code: alert

<div class="asp-alert asp-alert--grey" role="region">
  <div class="asp-container">
      <p><strong>Last import</strong>: 9 September 2025 12:34 - see <a href="#">advisory note</a></p>
  </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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "grey", content: { html: "<p><strong>Last import</strong>: 9 September 2025 12:34 - see <a href=</span>"#">advisory note</a></p>" } }) }}

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
modifier string or false (boolean) Default values are 'green', 'amber', 'red', 'grey' false (boolean) or null. 'blue', false (boolean) or null will have a blue background.
content array Required. The alert component content. See content.

Options for content

Name Type Description
html string Required. HTML for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the alert component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "components/alert/macro.njk" import aspAlert %}

{{ aspAlert({ modifier: "grey", content: { html: "<p><strong>Last import</strong>: 9 September 2025 12:34 - see <a href=</span>"#">advisory note</a></p>" } }) }}

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 Completed
Documentation In progress

Submit a request

Request a change or addition to the design system: this form.


Published 3 May 2024
Last updated 17 September 2025