Multi-File Selector
A copy-paste drag & drop component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Drag & DropHTMLCSSany framework
3 files2.4 MB total
Copy into your project
HTML
<!-- Multi-File Selector — pill summary of selected files -->
<div class="nuda-multi">
<span class="nuda-multi__icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15 L21 19 A 2 2 0 0 1 19 21 L5 21 A 2 2 0 0 1 3 19 L3 15" />
<path d="M7 10 L12 15 L17 10" />
<path d="M12 15 L12 3" />
</svg>
</span>
<div class="nuda-multi__info">
<span class="nuda-multi__count">3 files</span>
<span class="nuda-multi__size">2.4 MB total</span>
</div>
<button class="nuda-multi__clear" type="button" aria-label="Clear">×</button>
</div>CSS
/* Multi-File Selector
Compact accent pill summarizing pending files.
Customize: --mf-accent */
.nuda-multi {
--mf-accent: #e4ff54;
display: inline-flex;
align-items: center;
gap: 12px;
padding: 8px 10px 8px 12px;
background: rgba(228, 255, 84, 0.06);
border: 1px solid rgba(228, 255, 84, 0.2);
border-radius: 10px;
animation: nuda-mf-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nuda-multi__icon {
width: 26px;
height: 26px;
display: flex;
align-items: center;
justify-content: center;
color: var(--mf-accent);
flex-shrink: 0;
filter: drop-shadow(0 0 4px rgba(228, 255, 84, 0.4));
}
.nuda-multi__icon svg { width: 100%; height: 100%; }
.nuda-multi__info {
display: flex;
flex-direction: column;
line-height: 1;
}
.nuda-multi__count {
font: 700 0.875rem ui-sans-serif, system-ui, sans-serif;
color: #fafafa;
font-variant-numeric: tabular-nums;
}
.nuda-multi__size {
font: 500 0.7rem ui-sans-serif, system-ui, sans-serif;
color: #a1a1aa;
margin-top: 3px;
}
.nuda-multi__clear {
display: flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
background: rgba(255, 255, 255, 0.06);
border: none;
color: #a1a1aa;
font: 700 1rem ui-sans-serif, system-ui, sans-serif;
border-radius: 5px;
cursor: pointer;
line-height: 1;
transition: background 0.2s, color 0.2s;
}
.nuda-multi__clear:hover {
background: rgba(255, 99, 99, 0.15);
color: #ff6363;
}
@keyframes nuda-mf-in {
from { opacity: 0; transform: scale(0.92); }
to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-multi { animation: none; }
}How to use Multi-File Selector
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.