Dropzone
A file upload dropzone with drag-and-drop support, file validation, and preview.
Install
Run the following command to install the dropzone component:
npx acc-nuxt add DropzoneExamples
Default
Upload a file
Drag and drop or click to upload
Trigger slot
value:
External dropzone
Drag state: { "isOverDropZone": false, "hasInvalidDragTypes": false }
Value:
Multiple files
Upload a file
Drag and drop or click to upload
Accept specific types
Upload a file
Drag and drop or click to upload
Max file size
Upload a file
Drag and drop or click to upload
Disabled
Upload a file
Drag and drop or click to upload
Disabled errors
When disabled-errors is set, no error messages are shown in the dropzone for file type or file size errors. The error event is still emitted.
Upload a file
Drag and drop or click to upload
Max files
Upload a file
Drag and drop or click to upload
Hidden files section
Upload a file
Drag and drop or click to upload
Hide accept hint
Upload a file
Drag and drop or click to upload
Hide size hint
Upload a file
Drag and drop or click to upload
Hide max files hint
Upload a file
Drag and drop or click to upload
Hide preview
Hide image previews in the files section by setting hide-preview to true.
Upload a file
Drag and drop or click to upload
Custom remove button
Use the file-remove-button slot to customize the remove button for each file. This slot is only relevant when showFilesSection is true.
Upload a file
Drag and drop or click to upload
Slots
The dropzone component provides the following slots for customization.
Props
The dropzone component accepts the following props to customize its behavior.
Emits
The dropzone component emits the following events.
CSS Variables
The dropzone component can be customized using the following CSS variables.