StealThis .dev

Dating — Match Modal

A joyful It is a match celebration overlay for dating apps: two circular avatars glide together and lock behind a gradient heart badge while confetti and hearts burst across a blurred backdrop. Pill Send message and Keep swiping actions sit below a matched name, and a replay trigger re-runs the entrance so you can feel the dopamine hit again. Fully responsive, keyboard-friendly, and dependency-free vanilla JavaScript.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

The Match Modal is the emotional peak of any dating app — the moment two people both swipe right. This component recreates that celebration as a self-contained overlay: a blurred, dimmed backdrop fades in, two round avatars slide from opposite edges to meet in the center, and a gradient heart badge pops between them with a spring bounce. At the same instant a burst of confetti and floating hearts rains down, generated entirely with vanilla JavaScript so there are no image or library dependencies.

Below the avatars a friendly headline reads “It’s a Match!” followed by the matched person’s name and a soft line of copy. Two pill buttons — a filled gradient Send message and an outlined Keep swiping — give the user a clear choice, both with hover, active and visible focus states for keyboard users. Selecting either closes the modal and raises a small toast confirming the action.

The card is wrapped in a ~430px phone frame so it feels like a real mobile screen, and a floating trigger button lets you replay the whole animation on demand. Everything scales down cleanly to 360px via a dedicated media query, the overlay traps focus and closes on Escape or backdrop click, and all decorative motion respects prefers-reduced-motion.