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.
- Icon (optional) shows the purpose, from
leadIconor theleading-iconslot. - Label holds the text, from
labelor the default slot. Keep it visible; it carries the meaning. - Close button (optional,
dismissible) removes the badge.
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.
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.
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.