Versatile badge components for displaying counts, status, labels, and notifications with modern gradients, animations, and positioning options.
.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);
}
.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;
}
.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;
}
.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; }
.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;
}
@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;
}
/* 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;
}
.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;
}