Timer Ring Toast
A copy-paste toasts & alerts component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Toasts & AlertsHTMLCSSany framework
Link copied
Closes automatically
Copy into your project
HTML
<div class="nuda-ta2-timer-ring" role="status" aria-live="polite">
<svg class="nuda-ta2-timer-ring__ring" viewBox="0 0 36 36" width="28" height="28" aria-hidden="true">
<circle class="nuda-ta2-timer-ring__track" cx="18" cy="18" r="15.5" fill="none" stroke-width="3"></circle>
<circle class="nuda-ta2-timer-ring__fill" cx="18" cy="18" r="15.5" fill="none" stroke-width="3"></circle>
</svg>
<div class="nuda-ta2-timer-ring__body">
<p class="nuda-ta2-timer-ring__title">Link copied</p>
<p class="nuda-ta2-timer-ring__desc">Closes automatically</p>
</div>
<button class="nuda-ta2-timer-ring__close" aria-label="Dismiss notification">×</button>
</div>CSS
.nuda-ta2-timer-ring {
--c: #e4ff54;
display: flex;
align-items: center;
gap: .75rem;
background: #161616;
border: 1px solid rgba(255,255,255,.1);
border-radius: 12px;
padding: .7rem .85rem;
min-width: 270px;
max-width: 320px;
animation: _nuda-ta2timerringin .35s ease-out both;
}
.nuda-ta2-timer-ring__ring {
flex-shrink: 0;
transform: rotate(-90deg);
}
.nuda-ta2-timer-ring__track {
stroke: rgba(255,255,255,.12);
}
.nuda-ta2-timer-ring__fill {
stroke: var(--c);
stroke-linecap: round;
stroke-dasharray: 97.4;
stroke-dashoffset: 0;
animation: _nuda-ta2timerringdeplete 5s linear forwards;
}
.nuda-ta2-timer-ring__body {
flex: 1;
min-width: 0;
}
.nuda-ta2-timer-ring__title {
color: #fafafa;
font-size: .85rem;
font-weight: 600;
margin: 0;
}
.nuda-ta2-timer-ring__desc {
color: #8a8a8a;
font-size: .72rem;
margin: .15rem 0 0;
}
.nuda-ta2-timer-ring__close {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
margin: -14px -10px -14px 0;
background: none;
border: none;
color: #777;
font-size: 1.15rem;
cursor: pointer;
}
.nuda-ta2-timer-ring__close:hover {
color: #fafafa;
}
.nuda-ta2-timer-ring__close:focus-visible {
outline: 2px solid var(--c);
outline-offset: -2px;
border-radius: 8px;
}
@keyframes _nuda-ta2timerringin {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes _nuda-ta2timerringdeplete {
from {
stroke-dashoffset: 0;
}
to {
stroke-dashoffset: 97.4;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ta2-timer-ring {
animation: none;
}
.nuda-ta2-timer-ring__fill {
animation: none;
stroke-dashoffset: 48.7;
}
}
How to use Timer Ring Toast
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.