Animated Notification Badge
Modern notification badge with smooth animations, customizable styles, and interactive features, perfect for user notifications and alerts.
Responsive Design
Yes
Dark Mode Support
No
lines
473
Browser Compatibility
Chrome · Firefox · Safari · Edge
Live Preview
Interact with the component without leaving the page.
Overview
Modern notification badge with smooth animations, customizable styles, and interactive features, perfect for user notifications and alerts.
How to use
- Copy the HTML markup into your page.
- Paste the CSS into your stylesheet and ensure the selectors match your markup.
- Paste the JavaScript and load it after the markup.
- Adjust spacing, colors, and text to match your design system.
Customization tips
- Rename class names to avoid collisions with your existing CSS.
- Replace hard-coded colors with CSS variables for theming.
- Verify the layout at 320px, 768px, and 1024px widths.
HTML
47
lines
CSS
291
lines
JavaScript
135
lines
<div class="notification-badge-container">
<div class="notification-badge-demo">
<div class="demo-header">
<h2>Notification Badges</h2>
<p>Interactive badges with animations</p>
</div>
<div class="badges-wrapper">
<div class="badge-item">
<div class="icon-wrapper">
<span class="icon">🔔</span>
<span class="notification-badge" id="notificationBadge1">3</span>
</div>
<div class="badge-label">Messages</div>
</div>
<div class="badge-item">
<div class="icon-wrapper">
<span class="icon">📧</span>
<span class="notification-badge success" id="notificationBadge2">5</span>
</div>
<div class="badge-label">Emails</div>
</div>
<div class="badge-item">
<div class="icon-wrapper">
<span class="icon">🛒</span>
<span class="notification-badge warning" id="notificationBadge3">12</span>
</div>
<div class="badge-label">Cart</div>
</div>
<div class="badge-item">
<div class="icon-wrapper">
<span class="icon">❤️</span>
<span class="notification-badge error" id="notificationBadge4">7</span>
</div>
<div class="badge-label">Likes</div>
</div>
</div>
<div class="controls-wrapper">
<button class="btn btn-primary" id="addNotificationBtn">Add Notification</button>
<button class="btn btn-secondary" id="clearNotificationsBtn">Clear All</button>
</div>
</div>
</div>
Browser Compatibility
Chrome
>= 50
Firefox
>= 45
Safari
>= 10
Edge
>= 15