--- title: Dropzone seoTitle: Dropzone file upload order: 14 summary: A file field users can drop files onto, with a list of the chosen files, validation and optional uploads with a progress bar. description: Add a drag-and-drop file upload to a form with the native Tabler Dropzone plugin. No extra library is needed. related: [/ui/forms/elements, /ui/forms/validation, /ui/components/progress] added-in: '1.7.0' source: core/scss/ui/forms/_form-dropzone.scss css-vars: dropzone classnames: component: - class: dropzone desc: Wrapper; stacks the drop area and the file list and holds the CSS variables part: - class: dropzone-area desc: Dashed drop area; a label around the file input, so a click opens the file dialog - class: dropzone-input desc: The real file input, hidden visually but still focusable - class: dropzone-title desc: Main line of text in the drop area - class: dropzone-hint desc: Smaller second line, for the accepted types and the size limit - class: dropzone-list desc: Column of file rows; hidden while it is empty - class: dropzone-item desc: One file row with a border, the text and a remove button - class: dropzone-item-body desc: Text column of a row; takes the free width - class: dropzone-item-name desc: File name, cut with an ellipsis when it is too long - class: dropzone-item-meta desc: Small muted line for the file size or a message behavior: - class: dropzone-dragover desc: Set on the wrapper while a file is dragged over it; highlights the drop area - class: dropzone-item-success desc: Row of an uploaded file; hides the progress bar - class: dropzone-item-error desc: Row of a rejected or failed file; shows the message in red and hides the progress bar --- import Example from '@components/Example.astro'; import CodeDocs from '@components/CodeDocs.astro'; import Icon from '@ui/Icon.astro'; ## Overview A dropzone is a file field with a large drop area. Users can drop files on it or click it to open the file dialog. The chosen files are shown in a list below, each with its name, its size and a remove button. The plugin is part of `tabler.js` and needs no extra library. The drop area is a `