Skip to main content

Figma Storybook

Tag

A compact label representing a metadata value, category, or filter applied to content. Use to display user-applied or system-assigned classifications that can be removed. Don't use for read-only status values — use Badge or Pill instead.

Figma Storybook Docs

Description

What it does

Displays a short text label that represents a classification, keyword, or filter applied to a record or content item. Tags are interactive — they can be dismissed or removed by the user, distinguishing them from static labels.

Where it appears

Filter bars on stakeholder lists and consultation records in Open Point; topic and interest filters on community engagement pages in Social Point; keyword labels on uploaded documents, submissions, and reports.

Why it exists

Government users need to apply and manage multiple classifications to records (e.g. 'Transport', 'Urgent', 'Phase 2'). Tags provide a scannable, removable representation of those classifications without cluttering the primary content area.

Dependencies

Badge, Pill, Input

Anatomy

PartRequired?Notes
Container Required Rounded pill or chip shape housing all tag content. Uses --op-radius-pill or --op-radius-md depending on variant.
Label text Required Short plain-language string identifying the classification. Truncates with ellipsis at a max-width; full value shown on hover via tooltip.
Remove button Optional An icon button (close icon) that dismisses the tag. Required when tags are user-removable. Must be keyboard-accessible and have a visually hidden descriptive label.
Leading icon Optional A small decorative or semantic icon preceding the label text. Use only when it adds meaningful context (e.g. a category icon).

Variants

Default

Neutral classification or keyword

Use for user-applied or system-assigned labels that do not carry a status meaning. Suitable for topic tags, keyword filters, and record classifications.

Removable

Active filter or user-applied label that can be dismissed

Use when the tag represents an active filter or selection that the user can clear. Always include a visible remove button and accessible label.

Outlined

Lower-visual-weight classification

Use when tags appear alongside heavier UI elements and need to recede visually. Suitable for secondary metadata in detail panels.

States

State Behaviour
Default Tag is visible and static. Remove button (if present) is visible but not active.
Hover Remove button background transitions to --op-color-interactive-hover. Cursor changes to pointer over the remove button.
Focus Focus ring (3px solid --op-color-interactive-focus) appears on the remove button. Focus is not placed on the tag container itself unless the tag is also clickable.
Disabled Tag and remove button are non-interactive. Opacity reduced to 40%. Remove button is not focusable. Use sparingly — prefer hiding tags that cannot be acted on.
Loading/pending removal After remove button is activated, tag can briefly show a spinner in place of the close icon to indicate async removal before disappearing.

Usage guidelines

When to use

  • Displaying user-applied classifications on a stakeholder record, e.g. 'Transport', 'Media', 'High priority'.
  • Showing active filters in a filter bar above a list of consultations or submissions.
  • Representing interest topics selected by a community member on their Social Point profile.
  • Labelling uploaded documents with content categories before submission.

When not to use

  • Displaying read-only status values such as 'Active', 'Closed', or 'Draft' — use Badge instead.
  • Navigating between views or sections — use tabs or links.
  • Representing a single boolean state (on/off) — use a Checkbox or Switch.
  • Long multi-word labels — tags are designed for short strings (1–3 words). Truncate or rephrase if needed.

Do / Don't

Do

Keep tag labels short (1–3 words). Use sentence case.

Don't

Don't use full sentences or punctuation inside a tag label.

Do

Provide a descriptive accessible label on the remove button, e.g. 'Remove Transport tag'.

Don't

Don't use a bare times character as the only accessible label for the remove action.

Do

Group related tags in a horizontal wrapping row with consistent spacing (--op-space-8 gap).

Don't

Don't mix Tag and Badge in the same row to represent the same type of information — pick one.

Do

Announce tag removal to screen readers using an ARIA live region.

Don't

Don't silently remove a tag without any feedback to assistive technology users.

Was this page helpful?

Updated 9 September 2026