Skip to content

System Alert

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

Toasts & AlertsHTMLCSSany framework
Storage almost full
94% used · 540 MB left

Copy into your project

HTML
<div class="nuda-sysalert">
  <div class="nuda-sysalert__icon">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
      <path d="M12 9v4M12 17h.01" />
      <path d="M10.3 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" />
    </svg>
  </div>
  <div class="nuda-sysalert__body">
    <div class="nuda-sysalert__title">Storage almost full</div>
    <div class="nuda-sysalert__msg">94% used · 540 MB left</div>
  </div>
  <button class="nuda-sysalert__close" aria-label="Dismiss">×</button>
</div>
CSS
.nuda-sysalert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,180,94,.06);
  border: 1px solid rgba(255,180,94,.3);
  border-left: 3px solid #ffb45e;
  border-radius: 10px;
  color: #fafafa;
  width: 100%;
  max-width: 300px;
  animation: _sysAlertIn .45s cubic-bezier(.16,1,.3,1) both;
}

.nuda-sysalert__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #ffb45e;
  flex-shrink: 0;
  margin-top: 1px;
  animation: _sysWarnShake .6s ease-in-out;
}

.nuda-sysalert__icon svg {
  width: 18px;
  height: 18px;
}

.nuda-sysalert__body {
  flex: 1;
  min-width: 0;
}

.nuda-sysalert__title {
  font-size: 12px;
  font-weight: 600;
  color: #fafafa;
}

.nuda-sysalert__msg {
  font-size: 11px;
  color: #a0a0a8;
  margin-top: 2px;
}

.nuda-sysalert__close {
  background: transparent;
  border: 0;
  color: #63636e;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  transition: color .2s,transform .2s;
}

.nuda-sysalert__close:hover {
  color: #fafafa;
  transform: scale(1.2);
}

@keyframes _sysAlertIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes _sysWarnShake {
  0%,100% {
    transform: rotate(0);
  }
  20%,60% {
    transform: rotate(-8deg);
  }
  40%,80% {
    transform: rotate(8deg);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-sysalert,.nuda-sysalert__icon {
    animation: none;
  }
}

How to use System Alert

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 toasts & alerts components

← Browse all NudaUI components