Badges - Notification Badges and Pills

Versatile badge components for displaying counts, status, labels, and notifications with modern gradients, animations, and positioning options.

1. Notification Count Badges

3 12 99+ 5
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(255,107,107,0.4);
}

2. Status Pills (Success, Warning, Error, Info)

Success Warning Error Info
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.pill-success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

3. Positioned Badges on Buttons

5
12
3
.button-with-badge {
  position: relative;
  display: inline-block;
}

.badge-positioned {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  border: 2px solid white;
}

4. Positioned Badges on Avatars

JD
SK
AL
MR
.avatar-with-badge {
  position: relative;
  display: inline-block;
}

.status-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid white;
}

.status-online { background: #43e97b; }
.status-busy { background: #ff6b6b; }
.status-away { background: #ffd93d; }
.status-offline { background: #999; }

5. Dot Indicators

Active and running
Pending approval
Failed to process
Processing request
Live status with pulse
.dot-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

/* Pulse ring effect */
.pulse-ring::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 2s ease-out infinite;
}

6. Animated Pulse Effect

New 9
2
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

7. Color System

Solid Badges

Primary Secondary Success Warning Error Info

Outlined Badges

Primary Success Error
/* Gradient badges */
.badge-primary {
  background: #2563eb;
}

/* Outlined badges */
.badge-outlined {
  background: transparent;
  border: 2px solid currentColor;
  box-shadow: none;
}

.badge-outlined.badge-primary {
  color: #2563eb;
  border-color: #2563eb;
}

8. Size Variations

Small Medium Large
.badge-sm {
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  border-radius: 8px;
}

.badge-md {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 12px;
}

.badge-lg {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 16px;
}

9. Real-World Examples

Navigation with Badges

24
3

Status Labels

Deployed Building Queued Failed

Feature Tags

New Beta Pro Featured