StealThis .dev

Game — Achievement / Trophy Unlock Toast

Console-style achievement unlock toast system: a slide-in notification with glowing trophy badge, rarity tier, achievement name, and gamerscore reward, finished with a shine sweep, sound-pulse ring, and auto-dismiss timer bar. Toasts queue and play one at a time across five rarities from common to platinum, while an achievements list flips locked rows to unlocked with animated progress bars and a count-up gamerscore counter. Vanilla JS with a WebAudio chime and reduced-motion support.

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

Code

Achievement / Trophy Unlock Toast

A dark, neon-trimmed trophy room for the fictional Nullforge title Ashen Vanguard. The header pairs a clipped-corner studio badge with a live gamerscore board, and below it a trigger panel offers five rarity buttons — Common through Platinum — each tinted with its own tier color and point value. Pressing one fires an Xbox/PSN-style unlock toast: it slides in from the right with a popping badge icon, rarity kicker, achievement name, +G reward, a shine sweep across the card, a pulsing sound ring, and a draining timer bar before it slides back out.

Unlocks are queued, so mashing several buttons plays the toasts one at a time instead of stacking chaos. Each unlock also flips the matching row in the achievements list from locked to unlocked — swapping its muted badge for a glowing tier-colored one — and the total gamerscore counts up with an eased animation. Locked rows show animated completion progress bars, a “Surprise me” button rolls a random remaining unlock, and a mute toggle silences the WebAudio chime, which plays a brighter, longer arpeggio for higher tiers.

Everything is vanilla HTML, CSS, and JS: rarity theming is driven by a single --tier custom property per row and toast, the queue is a tiny array with a playNext() loop, and prefers-reduced-motion shortens holds and disables the slide and sweep animations.

Illustrative UI only — fictional games, studios, characters, and data. Not engine integrations.