Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    FileDropzone

    A drop area for files, with a file chooser and a list of the chosen files.

    Storybook
    Storybook
    Source
    Source

    Added

    • First version: drop zone, native file chooser, accept, maxSize, maxFiles, rejection messages, file list and announcements.
    • The ui.file-dropzone.* strings.
    • Per-file upload state: fileStatus and onRetry; the ui.file-dropzone.uploading, uploaded, retry and progress strings.
    • onUpload(file, signal): without making network requests itself, the component runs the upload the app supplies, with one AbortController per file; removing a file while it uploads cancels it, retry calls it again, and rejected files are never uploaded. A summary is announced when the uploads finish. The ui.file-dropzone.cancel, failed, errors, summary and summary-failed strings.

    Changed

    • A failed file’s row takes the danger border of an invalid field.
    • A real “Choose files” button opens the file chooser; the native input leaves the tab order and focus returns to this button after a removal.
    • When more than one file is rejected, each one has its own line in the “Files not added” list and is announced through the status region.