Skip to content

Error With Copyable Id

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

Error & 404 PagesHTMLCSSany framework

An unexpected error occurred. Our team has been notified.

ERR-7F3A2C9D

Copy into your project

HTML
<div class="nuda-ep2-error-id">
  <div class="nuda-ep2-error-id__icon" aria-hidden="true">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
      <path d="M12 9v4" />
      <path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" />
      <path d="M12 17h.01" />
    </svg>
  </div>
  <p class="nuda-ep2-error-id__title" role="alert">Something went wrong</p>
  <p class="nuda-ep2-error-id__sub">An unexpected error occurred. Our team has been notified.</p>
  <div class="nuda-ep2-error-id__id">
    <code class="nuda-ep2-error-id__code">ERR-7F3A2C9D</code>
    <button class="nuda-ep2-error-id__copy" type="button" aria-label="Copy error id">
      <svg class="nuda-ep2-error-id__copy-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
           stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
        <rect x="9" y="9" width="13" height="13" rx="2" />
        <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" />
      </svg>
      <svg class="nuda-ep2-error-id__copy-check" viewBox="0 0 24 24" fill="none" stroke="currentColor"
           stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
        <polyline points="20 6 9 17 4 12" />
      </svg>
    </button>
  </div>
  <button class="nuda-ep2-error-id__btn" type="button">Reload page</button>
</div>
CSS
.nuda-ep2-error-id {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 20px;
  background: #101010;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  width: 100%;
  max-width: 270px;
  text-align: center;
  font-family: ui-sans-serif,system-ui;
}

.nuda-ep2-error-id__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6b6b;
  background: rgba(255,107,107,.08);
  border: 1px solid rgba(255,107,107,.2);
  border-radius: 50%;
  margin-bottom: 4px;
  animation: _nuda-ep2errorid-pulse 2.2s ease-in-out infinite;
}

.nuda-ep2-error-id__icon svg {
  width: 22px;
  height: 22px;
}

.nuda-ep2-error-id__title {
  margin: 0;
  color: #fafafa;
  font-size: 14px;
  font-weight: 700;
}

.nuda-ep2-error-id__sub {
  margin: 0;
  color: #8a8a8a;
  font-size: 11px;
  line-height: 1.5;
  max-width: 210px;
}

.nuda-ep2-error-id__id {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 2px 2px 12px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
}

.nuda-ep2-error-id__code {
  color: #cfcfcf;
  font-size: 10.5px;
  font-family: ui-monospace,monospace;
  letter-spacing: .02em;
}

.nuda-ep2-error-id__copy {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: rgba(255,255,255,.05);
  color: #999;
  cursor: pointer;
}

.nuda-ep2-error-id__copy:hover {
  background: rgba(255,255,255,.1);
  color: #fafafa;
}

.nuda-ep2-error-id__copy:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-ep2-error-id__copy-icon {
  width: 14px;
  height: 14px;
  transition: opacity .2s,transform .2s;
}

.nuda-ep2-error-id__copy-check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  color: #22c55e;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s,transform .2s;
}

.nuda-ep2-error-id__copy--done .nuda-ep2-error-id__copy-icon {
  opacity: 0;
  transform: scale(.5);
}

.nuda-ep2-error-id__copy--done .nuda-ep2-error-id__copy-check {
  opacity: 1;
  transform: scale(1);
}

.nuda-ep2-error-id__btn {
  margin-top: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(228,255,84,.3);
  background: rgba(228,255,84,.1);
  color: #e4ff54;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.nuda-ep2-error-id__btn:hover {
  background: rgba(228,255,84,.18);
}

.nuda-ep2-error-id__btn:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

@keyframes _nuda-ep2errorid-pulse {
  0%,100% {
    box-shadow: 0 0 0 0 rgba(255,107,107,.25);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255,107,107,0);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ep2-error-id__icon {
    animation: none;
  }
  .nuda-ep2-error-id__copy-icon,.nuda-ep2-error-id__copy-check {
    transition: none;
  }
}

How to use Error With Copyable Id

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 error & 404 pages components

← Browse all NudaUI components