Use cases
- Unread counts on icons — bell, inbox, messages, tasks.
- "New" indicator without a number (
dotprop) — signal availability without quantification.
When NOT to use
- For a chip with text → use StatusBadge or Badge.
- For a counter that isn't an overlay → render the number inline as text.
Composition
The badge absolutely-positions itself in the chosen corner of its parent. The parent must be position: relative (web) or a wrapping <View> (native):
<div className="relative">
<BellIcon />
<NotificationBadge count={5} />
</div>Count behaviour
count={0}andcount={undefined}hide the badge — no empty pill on the icon.count > maxcollapses to${max}+(default cap99).- Pass
childrento override the rendered label (e.g. a localised "many" word).
Tones
| Tone | Use when |
|---|---|
danger | Alerts, critical unread (default). |
warning | Pending actions that aren't blocking. |
accent | Brand-orange — new content, "What's new" feed. |
primary | Brand-navy — quieter, app-chrome counts. |
Placement
top-right is the convention. top-left / bottom-* exist for RTL layouts and unusual host shapes (a profile menu with the badge under the avatar).
Related
- Badge — text pill inline with content (not a counter overlay).
- StatusBadge — semantic state indicator with icon and tone.
- Avatar — common host element for a notification dot.