Web component / unpkg

<form-dropzone>

Import the guarded definition helper. See the README for the full API.

One PDF attachment

Importing define.js automatically attempts registration; calling its helper again is safe. Drop a PDF or use the native picker. Other dropped types and excess files are named in the status announcement; choose another file to recover. If JavaScript, the required APIs, or the CDN load is unavailable, the labeled native picker remains.

<form-dropzone>
  <label for="unpkg-document">Choose a PDF</label>
  <input
    id="unpkg-document"
    name="document"
    type="file"
    accept=".pdf" />
</form-dropzone>

<script type="module">
  import { defineFormDropzone } from 'https://unpkg.com/@aarongustafson/form-dropzone@latest/define.js?module';

  defineFormDropzone();
</script>