Components/Action

Tag

Tags are small inline labels that mark or categorise whatever they sit beside. They let a reader scan a list and take in its structure at a glance, and some of them can be added or removed by the reader as a way of narrowing what they are looking at.

import { Tag } from '@growth-protocol-ai/alpha';

On this page

Compliance
variant
size
icon
state
Tag.tsxtsx
1import { Tag } from '@growth-protocol-ai/alpha';
2
3<Tag variant="primary" size="regular" icon="none" disabled={false}>
4 Compliance
5</Tag>

When to use

Reach for a tag when a value belongs to something else on the row — a category, an owner, a state, a filter the reader has applied — and the reader should take it in while scanning rather than stop and read it. Let the glyph decide the rest: a tag that can be added or taken off says so with one, and a tag that only informs carries none.

When not to use

Do not use a tag as the control that carries a screen’s work; that is Button, and the way to tell them apart is what the row would lose. A tag annotates something already there and is still legible with nothing to click, where a button is the reason the row exists. A fixed set of choices the reader picks from is neither — Checkbox or Dropdown asks that question once, instead of scattering it across a row of glyphs.

variant3 values

The same three names the button uses, because a tag is a downscaled version of the same idea: how much the thing should stand out among its neighbours. What differs is the ceiling — a tag never carries a screen’s main action, so there is no depth surface and no danger.

Complianceprimary
Compliancesecondary
Complianceoutlined
variantWhen to use
primaryThe brand fill. For the one tag in a group that is the point — a suggestion to accept, a selection just made. A row of them is a row with no hierarchy in it.
secondaryA tonal step off the page. The everyday default in practice: a category, an owner, a value out of a set, where the tag is information the reader takes in rather than acts on.
outlinedA border and the page’s own surface. The quietest of the three, and the one to reach for on a busy row — a table cell, a card footer — where another filled shape would read as another control.

size3 values

Geometry only, and each size pairs its height with a radius near 30% of it: a 12px arc on a 20px-tall element is half its height and reads as a lozenge rather than a tag. Regular is 36px, the height the button, the text field and the dropdown trigger share, so a tag sits inline beside any of them. There is no Large — 52px is the system’s primary-action height, and a tag is an annotation.

Complianceregular
Compliancesmall
Compliancexsmall
sizeWhen to use
regular36px, 12px radius, Body Medium Bold. Beside a control, or on its own line. The only size that lines up with the rest of the system.
small26px, 8px radius, the same type as Regular. Inside something that already has its own chrome — a card, a modal, a toolbar — where Regular would be the tallest thing in the box.
xsmall20px, 6px radius, and the one size that steps down to Body Small Bold. Table cells, inline metric labels, dense list rows. The type change is what gives it a rank of its own rather than making it a narrower Small.

icon3 values

The glyph is not decoration — it is what the tag does, and it decides the element. A leading + or a trailing × renders a button, so the tag is focusable, announced and clickable; neither renders a span, and a span has no cursor and no hover. So pick this by what should happen when someone clicks, and the rest follows.

Compliancenone
add
remove
iconWhen to use
noneInformative, and a span. A status, a label, a piece of metadata — read-only, with nothing to click. The default, and the common case.
addA leading +, and a button. The item is not in the collection yet and this puts it there: a picker, a suggestion, a “create new” affordance.
removeA trailing ×, and a button. The tag is already applied and this takes it off. The × is the only dismissal affordance a tag has, so a removable tag must carry one.