Skip to content

Drop Zone

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

File UploadHTMLCSSany framework

Click or drop files here

PNG, JPG, PDF up to 10MB

Copy into your project

HTML
<div class="nuda-dropzone" role="button" tabindex="0" aria-label="Upload files">
  <svg class="nuda-dropzone__icon" viewBox="0 0 24 24" fill="none"
       stroke="currentColor" stroke-width="1.5" aria-hidden="true">
    <path d="M12 16V4M12 4l-4 4M12 4l4 4"
          stroke-linecap="round" stroke-linejoin="round" />
    <path d="M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"
          stroke-linecap="round" />
  </svg>
  <p class="nuda-dropzone__title">Click or drop files here</p>
  <p class="nuda-dropzone__hint">PNG, JPG, PDF up to 10MB</p>
</div>
CSS
/* Drop Zone
   Dashed area inviting click-or-drop uploads.
   Customize: --dz-bg, --dz-border, --dz-accent */

.nuda-dropzone {
  --dz-bg: #0c0c10;
  --dz-border: rgba(255, 255, 255, 0.1);
  --dz-accent: #e4ff54;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  background: var(--dz-bg);
  border: 1.5px dashed var(--dz-border);
  border-radius: 12px;
  color: #a0a0a8;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 280px;
}

.nuda-dropzone:hover {
  border-color: rgba(228, 255, 84, 0.4);
  background: #111114;
}

.nuda-dropzone__icon {
  width: 32px;
  height: 32px;
  color: var(--dz-accent);
  opacity: 0.8;
}

.nuda-dropzone__title {
  margin: 0;
  font-size: 0.95rem;
  color: #fafafa;
  font-weight: 500;
}

.nuda-dropzone__hint {
  margin: 0;
  font-size: 0.8rem;
  color: #63636e;
}

@media (prefers-reduced-motion: reduce) {
  .nuda-dropzone {
    transition: none;
  }
}

How to use Drop Zone

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 file upload components

← Browse all NudaUI components