Tag
Tags are compact labels used to categorize or highlight content, helping users quickly identify status, type, or context.
Quarantine
Tags label, categorise, or highlight content in a compact form. They help users identify the status, context, or type of information quickly and consistently. A Tag can include an optional icon or link, depending on the use case.
Anatomy
Section titled “Anatomy”- Container
- Icon
- Tag text
- Link
When to use it
Section titled “When to use it”Use a Tag when:
- You need to indicate the status or category of an element (Success, Danger, Information).
- You’re displaying metadata or filters (search results, applied filters).
- You need to highlight a contextual link via the Has Link variant.
Avoid Tags when:
- The action is a primary CTA — use buttons.
- The layout is dense and tags would add visual noise without hierarchy.
- A plain label or badge would suffice without any interaction.
Properties
Section titled “Properties”Type
Five semantic types: Success, Danger, Info, Inactive, and Neutral. Each carries a distinct colour set tuned to the meaning, so a Success tag reads as positive across both visual styles.
Style
Two visual styles: Subtle uses a tinted background with a border, Bold uses a solid background. Subtle reads quieter inside lists and cards; bold draws more attention to a single item.
Icon
Optional leading icon, useful for reinforcing the meaning (a check for Success, a warning for Danger). Decorative icons should stay hidden from assistive tech.
Link
Optional trailing Link Button, used when the tag pairs a label with a contextual action. The link inherits the Tag text colour for legibility.
Platform considerations
Section titled “Platform considerations”Desktop
Tags sit comfortably inline next to titles or metadata. Keep their padding consistent across surfaces so the rhythm of a page holds.
Tablet
Same inline placement. Watch tag density inside cards — too many tags in one row crowd the layout quickly.
Mobile
Stack tags onto multiple rows rather than truncating the labels. Keep the leading icon (if any) at its natural size so the meaning still reads.
Best practices
Section titled “Best practices”Tags are designed for light mode only — they’re intended for use inside cards, which always have a white or near-white background. They are not tested for use on dark or coloured surfaces.
Do
Use tags to clarify type or status, combine with links when contextually relevant, keep labels short and clear, and lean on the subtle style by default — it includes a border that lifts contrast on light surfaces.
Don't
Don’t use tags as buttons (reach for the actual Button component), don’t place tags over dark backgrounds (the colour set isn’t tested there), and don’t pack too many tags into a small space — visual noise hides the meaning.
Content guidelines
Section titled “Content guidelines”Tag text should be short, ideally one or two words, and name the status or category in plain language (“In stock”, “Available”, “Sold out”). Use sentence case (“In stock”, not “IN STOCK”) and skip trailing punctuation. When a tag pairs with a link, the link label should name the action (“View details”) so the two read as a coherent unit rather than a redundant repeat.
Styles
Section titled “Styles”<div class="tng-tag"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div>Variants
Section titled “Variants”<div class="tng-tag is-error"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div><div class="tng-tag is-info"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div>Success
Section titled “Success”<div class="tng-tag is-success"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div><div class="tng-tag is-bold"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div><div class="tng-tag is-bold is-error"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div><div class="tng-tag is-bold is-info"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div><div class="tng-tag is-bold is-success"> <i aria-hidden class="tng-icon icon-star"></i> <span>Tag text</span> <a class="tng-link" href="#">Link</a></div>For designers
Section titled “For designers”Tags are built to be accessible and meet WCAG 2.1 AA standards.
- Font size: 12px Book. As the label forms part of a UI component, it qualifies under the 3:1 contrast ratio minimum.
- Colour contrast: All background, text and border combinations meet or exceed required contrast thresholds.
- Icons: Decorative by default (
aria-hidden). Should not duplicate the meaning of the label. If meaningful, must include semantic labelling. - Links: Must be focusable and keyboard navigable. Clearly styled and distinguishable from the tag text. Should include descriptive text for screen readers.
- Motion: Tags use no animation or flashing and do not introduce visual noise.
For developers
Section titled “For developers”Mark decorative icons with aria-hidden="true" (already shown in the examples).
Dismissible tags
Section titled “Dismissible tags”If a tag is dismissible (via a close button), ensure the button has an accessible label, for example aria-label="Remove tag".
Color is not enough
Section titled “Color is not enough”Never rely on color alone for status tags — pair the variant (is-error, is-info, is-success) with text or an icon so the meaning is accessible.
Content / Copy guidelines
Section titled “Content / Copy guidelines”Tags should use short, descriptive and consistent labels. The tone should be neutral, informative, and suitable for metadata or UI contexts.
- Text: Mandatory. One to three short words (e.g. “Hybrid”, “Low stock”, “Special edition”).
- Capitalisation: Sentence case (e.g. “In progress”).
- Max length: Aim for 18 characters or fewer to ensure layout stability.
- Icons: Optional. Should visually support the text meaning, not repeat it.
- Links: Optional. Must use clear, concise language (e.g. “Edit”, not “Click here”).
- Do not use emojis or punctuation in Tag labels.
- Avoid using verbs in the main label unless combined with a link.