@deltablot/dropzone

中文文档
7.4.4发布于 2026/07/31MITTypeScriptESM + CJS构建来源已验证近 30 天下载 4.7万

Handles drag and drop of files for you.

原始使用文档
文档目录5 节
  1. the new package name is @deltablot/dropzone
  2. Quickstart
  3. Not using a package manager or bundler?
  4. Community
  5. Main features ✅
Dropzone.js

npm version Validate CodeQL

Fork

This fork exists because upstream isn't maintained anymore. Its goal is to maintain this library in a good state, with mainly bugfixes and possibly minor improvements.

the new package name is @deltablot/dropzone

Description

Dropzone is a JavaScript library that turns any HTML element into a dropzone. This means that a user can drag and drop a file onto it, and Dropzone will display file previews and upload progress, and handle the upload for you via XHR.

It is fully configurable, can be styled according to your needs and is trusted by thousands.

Dropzone Screenshot

Quickstart

Install:

$ npm install --save @deltablot/dropzone
# or with yarn:
$ yarn add @deltablot/dropzone
# or with bun:
$ bun add @deltablot/dropzone

First argument is an element to bind to, second argument is the options object.

Use as ES6 module (recommended):

import { Dropzone } from "@deltablot/dropzone";
const dropzone = new Dropzone("#elementId", { url: "/file/post" });

or use as CommonJS module:

const { Dropzone } = require("@deltablot/dropzone");
const dropzone = new Dropzone("#elementId", { url: "/file/post" });

👉 Checkout our example implementations for different bundlers


CSS

@import "@deltablot/dropzone/src/dropzone";

Not using a package manager or bundler?

Use the standalone files like this:

<script src="https://unpkg.com/@deltablot/dropzone@7/dist/dropzone-min.js"></script>
<link
  rel="stylesheet"
  href="https://unpkg.com/@deltablot/dropzone@7/dist/dropzone.css"
  type="text/css"
/>

<div class="my-dropzone"></div>

<script>
  // Dropzone has been added as a global variable.
  const dropzone = new Dropzone(".my-dropzone", { url: "/file/post" });
</script>


Community

If you need support please open an issue.

If you have a feature request or want to discuss something, please use the issues as well.

Main features ✅

  • Beautiful by default
  • Image thumbnail previews. Simply register the callback thumbnail(file, data) and display the image wherever you like
  • High-DPI screen support
  • Multiple files and synchronous uploads
  • Progress updates
  • Support for large files
    • Chunked uploads (upload large files in smaller chunks)
  • Support for Amazon S3 Multipart upload
  • Complete theming. The look and feel of Dropzone is just the default theme. You can define everything yourself by overwriting the default event listeners.
  • Browser image resizing (resize the images before you upload them to your server)
  • Well tested

MIT License

See the LICENSE file

版本与发布记录

@deltablot/dropzone 共发布 19 个版本,首次发布于 2023/12/28;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
7.4.4latest2026/07/313 个月前
7.4.32026/01/199 个月前
7.4.22026/01/199 个月前
7.4.12026/01/189 个月前
7.3.12025/05/311.4 年前
7.3.02025/03/031.7 年前

关于 @deltablot/dropzone 的常见问题

@deltablot/dropzone 是什么?

Handles drag and drop of files for you.

如何安装 @deltablot/dropzone?

在项目目录运行 npm install @deltablot/dropzone,或使用 pnpm add / yarn add / bun add。

@deltablot/dropzone 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@deltablot/dropzone 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@deltablot/dropzone 可以商用吗?

@deltablot/dropzone 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@deltablot/dropzone 的下载量有多少?

根据 npm 官方下载统计,@deltablot/dropzone 在 2026/10/12 – 2026/11/10 这 30 天内被下载 46,962 次,日均约 1,565 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deltablot/dropzone 还在维护吗?

最新版本 7.4.4 发布于 2026/07/31(3 个月前);至今共发布 19 个版本,其中过去 12 个月发布了 4 个;首次发布于 2023/12/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。