Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Dropzone
Files in: drop them on it, or click to choose. Says what it takes, turns away the rest with the reason, and shows each upload.
Area
Every third file fails here, to show Try again.
<Dropzone accept="application/pdf,image/*" onupload={(file) => attachments.upload(file)} />
<Dropzone compact accept=".kml,.geojson" multiple={false} onfiles={importAreas} /> Compact
One row, in a form or a sheet. Here it only takes one KML or GeoJSON file, and hands it over without rows.
Import the outline instead of drawing it.
Rules
- Say what it takes before anything is dropped: the kinds and the size limit, under the prompt.
- Turn away what it can’t take straight away, by name and with the reason.
- Each file gets a row: uploading, done, or the error with Try again. A failed file never takes the others down.
- The generous area for a page whose job is the upload; compact in a form or a sheet.
- Drop works anywhere on it; click or Enter opens the file picker, so it works without a mouse.