Skip to content

Badge

Last updated 6 Nov 2026

NbBadge is a compact label used to highlight status, category, or a short value. Its variants name what it means (neutral, info, success, warning, danger, primary), and each paints a measured pair. Two sizes and an optional dot.

Dot mode ​

Add dot to prepend a status indicator before the label.

vue
<template>
  <NbBadge variant="success" dot>active</NbBadge>
</template>

Placeholder ​

placeholder stands in for a value that is not set yet: a dashed outline and quiet italic text instead of a fill. It is exactly as tall as a filled badge of the same size, so a row that holds either keeps its shape. Add interactive when pressing it sets the value: it becomes a real <button type="button"> with hover and focus states. Name it with aria-label when its text does not say what pressing it does, which is always the case for an icon on its own.

vue
<template>
  <NbBadge size="sm" placeholder interactive icon="tag" @click="pickLabels">
    No labels
  </NbBadge>
</template>

Props ​

PropTypeDefaultDescription
variantNbBadgeVariant'neutral'What the badge means. The colour names are deprecated aliases
sizeNbBadgeSize'md'Badge size ('sm' or 'md')
dotbooleanfalseShow a status dot before label
iconTIconSourcenoneA leading icon, sized to the badge
placeholderbooleanfalseA value not set yet: dashed outline, quiet italic text, same height as a filled badge
interactivebooleanfalseRender a <button type="button"> with hover and focus states. Listen with @click

Variant values ​

ValueUse casePaints
neutralDefault, archived, inactive--nb-c-neutral-surface, --nb-c-on-neutral-surface
infoInformational, in progress--nb-c-info-surface, --nb-c-on-info-surface
successDone, active, published--nb-c-success-surface, --nb-c-on-success-surface
warningPending, due soon, suspended--nb-c-warning-surface, --nb-c-on-warning-surface
dangerError, overdue, blocked--nb-c-danger-surface, --nb-c-on-danger-surface
primaryNot a status: a brand highlight--nb-c-primary, --nb-c-primary-a11y

Deprecated aliases: grey (neutral), blue (info), green (success), orange (warning), red (danger), purple (primary). They render as the intent and warn once in development.

Slots ​

SlotDescription
defaultBadge label text