Skip to content

Badge

Number or status indicator appearing at the top-right corner of an icon or text.

Basic Usage

Set the displayed number with count.

51599+
vue
<ABadge :count="5">
  <ABtn size="sm">Messages</ABtn>
</ABadge>
<ABadge :count="15">
  <ABtn size="sm">Comments</ABtn>
</ABadge>
<ABadge :count="100">
  <ABtn size="sm">Notifications</ABtn>
</ABadge>

Dot

Set dot to show only a red dot without a number.

vue
<ABadge dot>
  <ABtn size="sm">Messages</ABtn>
</ABadge>

Processing

Set processing to show a pulse animation.

vue
<ABadge processing>
  <ABtn size="sm">Processing</ABtn>
</ABadge>

Custom Color

Set badge color with color.

83
vue
<ABadge :count="8" color="#22c55e">
  <ABtn size="sm">Passed</ABtn>
</ABadge>

API

Props

NameTypeDefaultDescription
countnumberDisplayed number
maxnumber99Max value, shows N+ when exceeded
dotbooleanfalseShow as red dot
offset[number, number]Offset [horizontal, vertical]
colorstringCustom color
showZerobooleanfalseShow when count is 0
processingbooleanfalseProcessing pulse animation

Interaction

  • Number changes with spring elastic transition
  • Badge slightly enlarges on hover
  • Processing mode shows pulse diffusion animation

MIT License