Skip to main content
  1. Docs
  2. Components
  3. Forms

File upload

Choose or drop files: a drop zone over the browser's own file input, each upload with its status.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<input type="file">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A file the setup needs: SAML metadata, a certificate, a logo.
  • Importing a list: a CSV of users.
  • Several files, each uploaded and reported on its own.
Not for

02

Anatomy

  1. 1file-upload-zone<label>The dashed zone, a label for the input, Ember while a file is dragged over it; the hint is written from accept and maxSize.
  2. 2file-upload-input<input type="file">The browser's own file input: the keyboard and screen readers use it.
  3. 3file-upload-item<li>A file: its name, size and status, and remove.

03

Do and don't

Say what's accepted
Doaccept and maxSize: the hint says "XML, up to 1 MB".
Don'tAny file, then a rejection after the upload.

04

Content

  • The label names what's wanted: "SAML metadata", not "Upload".
  • Say why a file failed, as a fix: "Row 214: the email is missing."
Next — File uploadAPI