Blazor playground

Nova v3.37.0

Preview

Blazor

Tag

nv-tag

A compact coloured label that categorises content, links to a topic or stands for a removable filter.

Live demo

Use a tag to categorise content with short metadata, such as "Draft", "Internal" or "Energy". A tag can be static, link to a related page, or stand for a filter that people remove. Tags have no selected state. Use a status indicator for system or review states, and a pill for selectable filters.

Anatomy

An orange tag reading Label with four callouts: 1 marks the container, 2 the bookmark icon at the start, 3 the label, and 4 the remove icon at the end.

The parts of a tag.
  1. Container takes its colour from color. With href, the icon and label area becomes a link; the remove button remains a separate action.
  2. Leading icon (optional) goes in the leading-icon slot.
  3. Label holds the text, from label. It also names the remove button.
  4. Remove button (optional, dismissible) emits dismissed. The tag stays on the page until your application removes it.

Interaction and states

Use a static tag for metadata, href for navigation to a category, or dismissible for an active filter that can be removed. The remove button's square target occupies the trailing end of the tag and has default, hover, focus and disabled states. Keep its keyboard focus indicator visible.

disabled only disables removal; it does not disable an href link. Handle dismissed by removing the corresponding filter from application state. Tags do not have selected or active toggle states.

static
href
dismissible

Colours and content

color takes one of ten category colours: grey (the default), blue, green, turquoise, lime, yellow, amber, orange, red and crimson. Use colours consistently for the same category, and keep the label visible, because colour alone doesn't carry the meaning. Tags come in one size, and the icon is always extra small.

grey
blue
green
turquoise
lime
yellow
amber
orange
red
crimson
  • Use one or two words in sentence case.
  • Don't use a tag for counts or a status that changes.
  • disabled only turns off the remove button; the label stays readable.

Use a dedicated counter for unread totals or numeric indicators on icons, and a status indicator for results such as “Validated”. A category label can link to filtered content, but a control that toggles a filter belongs in a pill.

DoUse one or two words for a stable category.
Don'tUse a counter for unread totals and a status indicator for changing states.

Sources