Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Custom Inputs
Select
Components
Components
78
Micro Charts
Navigation
Libraries
Content Editor
Data View
Form Builder
Image Designer
Kanban Board
PDF Viewer
Video Player
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Buy License

Badge

The Badge directive attaches a small indicator to another element. Use it to show a count, dot, short text, or compact label on top of a button, icon, text, avatar, tab, or navigation item.

Use it for:
  • Counts: Show unread messages, notifications, tasks, updates, or pending items.
  • Small labels: Add very short text when the label belongs to a specific host element.
  • Dot indicators: Use the small size when only presence of a state matters.
  • Positioned context: Place the badge above, below, before, or after the host element with optional overlap.

Do not use Badge as a standalone block, long text label, avatar presence indicator, or full inline status pill. Use Chip, Avatar presence, Alert, or Announcement for those cases.

PropTypeDefault
ngsBadge
The content to be displayed in the badge
anynull
ngsBadgeColor
The color of the badge
stringprimary
ngsBadgeOverlap
Whether the badge should overlap its content
booleantrue
ngsBadgeDisabled
Whether the badge is disabled
booleanfalse
ngsBadgePosition
The position of the badge relative to the host element
BadgePositionabove after
ngsBadgeSize
The size of the badge
BadgeSizemedium
ngsBadgeHidden
Whether the badge is hidden
booleanfalse
ngsBadgeDescription
A description of the badge for accessibility
string''