File Replaced Notification
A copy-paste file upload component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
File UploadHTMLCSSany framework
File replaced
Copy into your project
HTML
<div class="nuda-replaced" role="status">
<div class="nuda-replaced__icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M3 12a9 9 0 0 1 15-6.7L21 7" stroke-linecap="round" />
<path d="M21 4v3h-3" stroke-linecap="round" stroke-linejoin="round" />
<path d="M21 12a9 9 0 0 1-15 6.7L3 17" stroke-linecap="round" />
<path d="M3 20v-3h3" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
<div class="nuda-replaced__body">
<p class="nuda-replaced__title">File replaced</p>
<p class="nuda-replaced__meta">
<span class="nuda-replaced__old">cover-v1.png</span>
<span class="nuda-replaced__arrow" aria-hidden="true">→</span>
<span class="nuda-replaced__new">cover-v2.png</span>
</p>
</div>
</div>CSS
/* File Replaced Notification
Inline notice when a file overwrites an existing one. */
.nuda-replaced {
display: flex;
align-items: center;
gap: 0.7rem;
padding: 0.65rem 0.85rem;
background: rgba(98, 182, 255, 0.06);
border: 1px solid rgba(98, 182, 255, 0.3);
border-radius: 10px;
min-width: 280px;
animation: nuda-replaced-slide 0.35s ease;
}
.nuda-replaced__icon {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(98, 182, 255, 0.12);
border-radius: 8px;
color: #62b6ff;
flex-shrink: 0;
}
.nuda-replaced__icon svg { width: 16px; height: 16px; }
.nuda-replaced__body { flex: 1; min-width: 0; }
.nuda-replaced__title {
margin: 0;
font-size: 0.82rem;
color: #fafafa;
font-weight: 600;
}
.nuda-replaced__meta {
margin: 0.1rem 0 0;
display: flex;
align-items: center;
gap: 0.35rem;
font-size: 0.74rem;
flex-wrap: wrap;
}
.nuda-replaced__old {
color: #63636e;
text-decoration: line-through;
}
.nuda-replaced__arrow { color: #62b6ff; }
.nuda-replaced__new {
color: #62b6ff;
font-weight: 500;
}
@keyframes nuda-replaced-slide {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-replaced { animation: none; }
}How to use File Replaced Notification
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.