Components

Tag

<strong class="govuk-tag">
  alpha
</strong>
{%- from "tag/macro.njk" import govukTag -%}

{{ govukTag({
  text: "alpha"
}) }}

You can configure this component using the Nunjucks macro arguments.

When to use this component

Use the tag component to indicate the status of something, such as an item on a task list or a phase banner.

How it works

There are 2 ways to use the tag component. You can use HTML or, if you are using Nunjucks or the GOV.UK Prototype Kit, you can use the Nunjucks macro.

<strong class="govuk-tag">
  alpha
</strong>
{%- from "tag/macro.njk" import govukTag -%}

{{ govukTag({
  text: "alpha"
}) }}

You can configure this component using the Nunjucks macro arguments.

Research on this component

If you’ve used this component, get in touch to share your user research findings.

Get in touch

If you’ve got a question, idea or suggestion share it in #govuk-design-system on cross-government Slack (open in app) or email the Design System team on govuk-design-system-support@digital.cabinet-office.gov.uk

Discuss ‘Tag’ on GitHub