File Dropzone

Svelte Component

Allow upload of files with drag and drop.

Examples

Monitor your browser's console when adding files.

Getting Started

Uses input[type='file'] to allow for all native input accessibility.

ts
let files: FileList;
html
<FileDropzone bind:files />

Title

Use the title property to provide a custom title.

html
<FileDropzone title="Upload your Attachment here." />

Notes

Use the notes property to provide additional text information on a second line.

html
<FileDropzone notes="Files should not exceed 5mb." />

Message

Use the default slot to replace the default UI entirely.

html
<FileDropzone>(message)</FileDropzone>