I'll build a polished notification badge gallery showcasing all those animations. Let me start by exploring the project structure and then creating the implementation.
Now I have a clear picture. Let me build the gallery. I'll create a custom CSS animation system and an interactive gallery with five sections, one for each animation type.
Now let me create the main App with the full gallery:
Let me fix the type errors and the confetti rendering:
Let me refactor the confetti system to use a global fixed-position layer with page coordinates:
Let me run the build to confirm everything works:
The build succeeded. Let me do a quick verification of the final structure and make one small polish — I want to ensure the confetti appears closer to where the badge actually is:
The build succeeded. Here's a summary of what I built:
Badge Lab — Notification Animation Gallery
A polished, interactive gallery demonstrating 5 animation families for notification badges across 22+ demos.
Architecture
src/App.tsx — Main app with tab-based gallery, inline SVG icons, and all interactive logic
src/index.css — Custom CSS keyframes for every animation (no animation libraries needed)
index.html — Updated title
Animation Families Implemented
-
Bounce Entrances — Elastic pop-in with overshoot (badge-bounce-in with cubic-bezier(0.34, 1.56, 0.64, 1)). Demonstrated on 6 icon types (mail, heart, cart, mention, chat, star).
-
Pulse Effects — Three variants:
- Scaling + glow halo (
badge-pulse)
- Expanding ripple ring (
anim-ripple via ::after)
- Floating dot indicator (
anim-float)
- All toggleable with pause/play.
-
Count-Up Animations — requestAnimationFrame-driven digit rolling with easeOutCubic easing, overflow clamping at 99+, plus per-digit flip transition (digit-roll).
-
Shake Alerts — Decaying shake on the badge (badge-shake with 10 keyframe steps) combined with icon wobble (anim-wobble) for a "whole widget jiggles" feel.
-
Clear Animations — A satisfying pop + scale-up + blur + fade (badge-clear) followed by a 14-particle confetti burst rendered in a fixed-position global layer, computed from the badge's page coordinates. Cleared badges show a bouncy check icon.
Design Touches
- Dark glassmorphism theme with radial gradient accents in rose/amber/sky/lime/violet
- Colored glow shadows per variant (
glow-rose, glow-amber, etc.)
- Subtle grid background with radial mask
- Live preview hero cycling through 4 badges
- Animated tab indicator underline
- "Restore all counts" button to replay
Build output: 268 KB (80 KB gzipped) as a single-file bundle.
Files built: index.html, src/index.css, src/App.tsx