Skip to content

Label tag

A label tag shows a label assigned to an item, such as a post or a conversation, and can let users remove it.

Label tags show which labels an item carries, for example in a list of posts or in a form. Where users can edit the labels, they can remove a label right from its tag.

Use a label tag to show a label that users assign to an item and can take away again.

Don’t use a label tag to show the status of an item. Use a badge instead.

Label tag with a folder icon and the label

Default

Label tag on hover, with the remove button over the end of the label

Hover

  1. Additional content. An icon or a letter that adds context to the label. It takes the place of the leading stripe.
  2. Label. The name of the label. A long name is shortened in the middle.
  3. Remove button. Optional. Appears over the end of the label when the pointer is on the tag.

Default. A static tag that users can’t remove. A stripe on the leading edge marks it as a label. The stripe is decorative and carries no meaning.

Open in Storybook (opens in a new tab)

Removable. A remove button lets users take the label off the item. Show it only where users can edit the labels of the item. Leave it out when users don’t have permission to change labels, and in read-only views such as reports.

Open in Storybook (opens in a new tab)

With an icon. An icon in front of the label adds context.

Open in Storybook (opens in a new tab)

Automatic. A letter in front of the label shows that the label was assigned automatically, for example by a rule, not by a user.

Open in Storybook (opens in a new tab)
  • Default: the tag shows the label.
  • Hover: on a removable tag, the remove button appears over the end of the label. Its cross turns red when the pointer is on it, because removing is a destructive action.
  • Long label: a name longer than the tag is shortened in the middle, so both its start and end stay readable. Hovering the label shows the full name in a tooltip.
Open in Storybook (opens in a new tab)
  • The tag is as wide as its label, up to a maximum width. The maximum can be changed when a layout needs it.
  • Clicking the remove button removes the label from the item right away, without a confirmation.
A post with the label tags Winter campaign and Product launch, and a green Published badge in the top right corner
Do. Use label tags for labels that users assign to an item, and a badge for its status.
The same post with Published shown as a green label tag in the top right corner
Don't. Show a status with a label tag. A status belongs in a badge.
  • Screen readers announce the name of the label, and the remove button says which label it removes.
  • Users can reach the remove button with the Tab key. The button becomes visible when it gets focus, and Enter or Space removes the label.
  • The full name of a shortened label shows in a tooltip on hover.
  • Badge: shows a status or a piece of information that users can’t remove.
  • Label tag group: shows several label tags of one item together.
  • Platform tag: shows which social network a profile, post or channel belongs to.