Blazor playground

Nova v3.37.0

Preview

Blazor

Badge

nv-badge

Legacy badge reference and migration guidance.

Warning

nv-badge is deprecated and will be removed in a future major version. Use a tag for labels and categories, a status indicator for system status, or a pill for selectable filters and toggles. The migration guide includes colour mappings and replacement examples.

The reference below supports existing badges while you migrate.

Anatomy

An orange outlined badge reading Badge with three callouts: 1 marks the bookmark icon at the start, 2 the label, and 3 the close icon at the end.

The parts of a badge.
  1. Icon (optional) shows the purpose, from leadIcon or the leading-icon slot.
  2. Label holds the text, from label or the default slot. Keep it visible; it carries the meaning.
  3. Close button (optional, dismissible) removes the badge.
leadIcon
dismissible

Colours

color takes a status, error, information, neutral, success or warning, or a category colour, amber, orange, turquoise, crimson or lime. The older values 1 to 10 still work. Don't rely on colour alone: the label must carry the meaning.

error
information
neutral
success
warning
amber
orange
turquoise
crimson
lime

Content

  • Use one or two words in sentence case, without a full stop.
  • Put counts in parentheses, such as "New (3)".
  • Keep the text on one line.
  • Omit unnecessary articles so the label remains easy to scan.
DoUse one or two words, and put counts in parentheses.
Don'tAvoid sentences, full stops and loose counts.

Icons and dismissal

Use leadIcon for a Nova symbol or the leading-icon slot for your own icon. Pair the icon and colour with a visible label; neither should carry the category or status alone. A static badge is informational, not a button.

A dismissible badge includes a keyboard-operable close button. Closing sets hidden and emits closeClicked; preventAutoClose lets the application control removal. Keep these details for existing integrations and use the replacements in the migration guide for new work.

Sources