File Dropzone
Allow upload of files with drag and drop.
import { FileDropzone } from '@skeletonlabs/skeleton';Demo
Uses input[type='file'] and allows for all native input features and accessibility. Including
multiple,
accept, and required.
Customization
Customize the component with the available icon, message, and
meta slots.
Binding Method
Use a FileList to bind the file data.
let files: FileList;<FileDropzone ... bind:files />On Change Event
Use the on:change event to monitor file selection or changes.
function onChangeHandler(e: Event): void {
console.log('file data:', e);
}<FileDropzone ... on:change={onChangeHandler}>Upload</FileDropzone>