Components
← All components

File Dropzone

stimeo--file-dropzone

Pick files by click, keyboard, or drag-and-drop, with image previews.

The stimeo--file-dropzone controller bridges a native file input and a drop zone. The trigger button opens the native dialog (keyboard-operable); dragging files over the zone adds them, with a data-dragover flag and a spoken hint (drag state is conveyed in words, not color alone). Each file is validated against accept, maxSize, and the file count (maxFiles, or 1 when the input is not multiple); rejects fire stimeo--file-dropzone:reject and set a data-…-invalid flag. Accepted files render from a template with a Remove {name} button and an image thumbnail (objectURL); every change dispatches stimeo--file-dropzone:change with the current File list. Removing a file revokes its objectURL and re-homes focus to a neighbor, else the trigger; disconnect revokes every outstanding objectURL. Upload transport stays with your app.

running

    Keyboard

    KeyAction
    Enter / Space Open the native file dialog from the trigger button.