# FileDropZone Documentation ## Installation ```bash jsrepo add ui/file-drop-zone ``` ## Components ### FileDropZone The root file drop zone component. #### Props | Prop | Type | Default Value | Required | Bindable | Description | |------|------|--------------|----------|----------|-------------| | ref | HTMLInputElement | null | false | true | A reference to the input element. | | children | Snippet | - | false | false | The content to render inside the drop zone. If not provided, a default UI is shown. | | onUpload | (files: File[]) => Promise | - | true | false | Called with the uploaded files when the user drops or selects files. | | maxFiles | number | - | false | false | The maximum number of files allowed to be uploaded. | | fileCount | number | - | false | false | The current number of files uploaded. Required if using maxFiles. | | maxFileSize | number | - | false | false | The maximum size of a file in bytes. | | onFileRejected | (opts: { reason: FileRejectedReason; file: File }) => void | - | false | false | Called when a file does not meet the upload criteria (size, or type). | | accept | string | - | false | false | A comma separated list of one or more file types to accept. [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept) Example: ".doc,.docx,application/msword" Common: "audio/*", "image/*", "video/*" |