Toast Slide
A copy-paste toasts & alerts component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Toasts & AlertsHTMLCSSany framework
✓
Saved successfully
Your changes have been saved.
Copy into your project
HTML
<div class="nuda-toast" role="alert" aria-live="polite">
<div class="nuda-toast__icon">✓</div>
<div class="nuda-toast__content">
<p class="nuda-toast__title">Saved successfully</p>
<p class="nuda-toast__desc">Your changes have been saved.</p>
</div>
<button class="nuda-toast__close" aria-label="Dismiss">×</button>
</div>CSS
/* Toast Slide
Toast notification sliding in from the right.
Customize: --toast-accent, --toast-bg, --toast-radius */
.nuda-toast {
--toast-accent: #e4ff54;
--toast-bg: rgba(255, 255, 255, 0.06);
--toast-radius: 10px;
display: flex;
align-items: flex-start;
gap: 0.75rem;
background: var(--toast-bg);
border: 1px solid rgba(255, 255, 255, 0.08);
border-left: 3px solid var(--toast-accent);
border-radius: var(--toast-radius);
padding: 0.85rem 1rem;
min-width: 280px;
animation: nuda-toast-slide-in 0.4s ease-out;
}
.nuda-toast__icon {
color: var(--toast-accent);
font-weight: 700;
font-size: 0.9rem;
margin-top: 1px;
}
.nuda-toast__content {
flex: 1;
}
.nuda-toast__title {
color: #fff;
font-size: 0.85rem;
font-weight: 600;
margin: 0;
}
.nuda-toast__desc {
color: #999;
font-size: 0.75rem;
margin: 0.2rem 0 0;
}
.nuda-toast__close {
background: none;
border: none;
color: #666;
font-size: 1.1rem;
cursor: pointer;
padding: 0;
line-height: 1;
}
.nuda-toast__close:hover {
color: #fff;
}
@keyframes nuda-toast-slide-in {
from {
opacity: 0;
transform: translateX(30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@media (prefers-reduced-motion: reduce) {
.nuda-toast {
animation: none;
}
}How to use Toast Slide
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.