Achievement Unlock
A copy-paste toasts & alerts component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Toasts & AlertsHTMLCSSany framework
Achievement Unlocked
Speed Demon
Copy into your project
HTML
<div class="nuda-achiev">
<div class="nuda-achiev__shine"></div>
<div class="nuda-achiev__medal">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="13" r="7" />
<path d="M8.5 11l3 2 4-4" />
<path d="M9 6l-3-4M15 6l3-4" />
</svg>
</div>
<div class="nuda-achiev__body">
<div class="nuda-achiev__label">Achievement Unlocked</div>
<div class="nuda-achiev__title">Speed Demon</div>
</div>
</div>CSS
.nuda-achiev {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: linear-gradient(135deg,#1a1a20,#0c0c10);
border: 1px solid #e4ff54;
border-radius: 12px;
color: #fafafa;
width: 100%;
max-width: 260px;
overflow: hidden;
animation: _achievIn .65s cubic-bezier(.34,1.56,.64,1) both;
box-shadow: 0 12px 32px -12px rgba(228,255,84,.4);
}
.nuda-achiev__shine {
position: absolute;
top: 0;
bottom: 0;
width: 80px;
background: linear-gradient(90deg,transparent,rgba(228,255,84,.3),transparent);
transform: translateX(-100%);
animation: _achievShine 2.4s ease-in-out infinite 0.6s;
}
.nuda-achiev__medal {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 42px;
height: 42px;
border-radius: 50%;
background: #e4ff54;
color: #09090b;
flex-shrink: 0;
animation: _achievMedal 1s cubic-bezier(.34,1.56,.64,1);
z-index: 1;
}
.nuda-achiev__medal svg {
width: 22px;
height: 22px;
}
.nuda-achiev__label {
font-size: 9px;
color: #e4ff54;
font-weight: 700;
letter-spacing: .12em;
text-transform: uppercase;
font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
}
.nuda-achiev__title {
font-size: 14px;
font-weight: 700;
margin-top: 2px;
}
.nuda-achiev__body {
position: relative;
z-index: 1;
}
@keyframes _achievIn {
from {
opacity: 0;
transform: translateY(20px) scale(.92);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes _achievShine {
0% {
transform: translateX(-100%);
}
50%,100% {
transform: translateX(300%);
}
}
@keyframes _achievMedal {
0% {
transform: scale(0) rotate(-180deg);
}
60% {
transform: scale(1.15) rotate(20deg);
}
100% {
transform: scale(1) rotate(0);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-achiev,.nuda-achiev__shine,.nuda-achiev__medal {
animation: none;
}
}
How to use Achievement Unlock
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.