Skip to content

Glass Toast

A copy-paste glassmorphism component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

GlassmorphismHTMLCSSany framework

Saved

Your changes are live.

Copy into your project

HTML
<div class="nuda-glass-toast" role="status">
  <span class="nuda-glass-toast__dot" aria-hidden="true"></span>
  <div class="nuda-glass-toast__body">
    <p class="nuda-glass-toast__title">Saved</p>
    <p class="nuda-glass-toast__msg">Your changes are live.</p>
  </div>
</div>
CSS
/* Glass Toast
   Frosted toast that slides in from the right.
   Customize: --glass-toast-accent */

.nuda-glass-toast {
  --glass-toast-accent: #e4ff54;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 210px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateX(110%);
  opacity: 0;
  animation: nuda-glass-toast-in 4s ease-in-out infinite;
  will-change: transform, opacity;
}

.nuda-glass-toast__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--glass-toast-accent);
  box-shadow: 0 0 10px rgba(228, 255, 84, 0.8);
}

.nuda-glass-toast__body { min-width: 0; }

.nuda-glass-toast__title {
  margin: 0;
  color: #fafafa;
  font: 700 0.8rem ui-sans-serif, system-ui;
}

.nuda-glass-toast__msg {
  margin: 0.1rem 0 0;
  color: rgba(250, 250, 250, 0.6);
  font: 500 0.72rem ui-sans-serif, system-ui;
}

/* In production, trigger a single play instead of an infinite loop. */
@keyframes nuda-glass-toast-in {
  0% { transform: translateX(110%); opacity: 0; }
  12%, 80% { transform: translateX(0); opacity: 1; }
  95%, 100% { transform: translateX(110%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-glass-toast {
    animation: none;
    transform: none;
    opacity: 1;
  }
}

How to use Glass 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.

More glassmorphism components

← Browse all NudaUI components