Status

<span class="asp-status asp-status--default">Booked. modifier: default</span>
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 'yellow', 'green', 'red', 'grey', false (boolean) or null. Note; false (boolean) or null, will return the default colour, blue.
text string Required. The status component content.
{% from "status/macro.njk" import aspStatus %}

{{ aspStatus({
modifier: "default",
text: "Booked. modifier: default"
}) }}

<span class="asp-status asp-status--yellow">In progress. modifier: yellow</span>
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 'yellow', 'green', 'red', 'grey', false (boolean) or null. Note; false (boolean) or null, will return the default colour, blue.
text string Required. The status component content.
{% from "status/macro.njk" import aspStatus %}

{{ aspStatus({
modifier: "yellow",
text: "In progress. modifier: yellow"
}) }}

<span class="asp-status asp-status--green">Successful. modifier: green</span>
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 'yellow', 'green', 'red', 'grey', false (boolean) or null. Note; false (boolean) or null, will return the default colour, blue.
text string Required. The status component content.
{% from "status/macro.njk" import aspStatus %}

{{ aspStatus({
modifier: "green",
text: "Successful. modifier: green"
}) }}

<span class="asp-status asp-status--red">Failed. modifier: red</span>
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 'yellow', 'green', 'red', 'grey', false (boolean) or null. Note; false (boolean) or null, will return the default colour, blue.
text string Required. The status component content.
{% from "status/macro.njk" import aspStatus %}

{{ aspStatus({
modifier: "red",
text: "Failed. modifier: red"
}) }}

<span class="asp-status asp-status--grey">modifier: grey</span>
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 'yellow', 'green', 'red', 'grey', false (boolean) or null. Note; false (boolean) or null, will return the default colour, blue.
text string Required. The status component content.
{% from "status/macro.njk" import aspStatus %}

{{ aspStatus({
modifier: "grey",
text: "modifier: grey"
}) }}

When to use this component

Use the status component when it’s possible for something to have more than one status and it’s useful for the user to know about that status. For example, you can use a status to show whether an item in a list has been ‘completed’.

WIP -- CK consideration for content (max 2/3 words)

Showing one or more statuses

Sometimes a single status is enough. For example if you need to tell users which parts of an application they’ve finished and which they have not, you may only need a ‘Completed’ status. Because the user understands that if something does not have a status, that means it’s incomplete.
Statuses should be helpful to users. The more you add, the harder it is for users to remember them. Start with the smallest number of statuses you think might work, then add more if your user research shows there’s a need for them.

Using colour with status

Use colour to help distinguish between different statuses – or to help draw the user’s attention to a status if it’s especially important. For example, it probably makes sense to use red a status that reads ‘Urgent’.

Do not use colour alone to convey information because it’s not accessible. If you use the same status in more than one place, make sure you keep the colour consistent.

Because status with solid colours tend to stand out more, it’s usually best to avoid mixing solid colours and tints: use one or the other. This matters less if you’re only using two colours.

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 3 May 2024
Last updated 11 September 2024