Brand Guide

Components

File dropzone

Takes one file, by a click or by drag and drop, such as a CV.

Default

Choose or drop a file to see it upload. The whole dashed area can be clicked.

Uploading

A spinner and the step, with the file's name muted under it.
Uploading your CV…sam-okafor-cv.pdf

Uploaded

A solid success border and tint, a tick and the file’s name. With replaceLabel, hover or focus shows the replace cue, and a click or a drop picks a new file.

With remove

onRemove adds a button in the top right corner. It sits outside the drop area, so pressing it never opens the file picker.
sam-okafor-portfolio.pdf · 4.8 MB

Invalid

The dashed border turns red, and the form shows its message below. Choose a PDF or DOCX to clear it.

Disabled

Best practices

  • The dropzone only draws the three states. The form holds status, sends the file and checks its size and type, since accept only filters the file picker and a dropped file can be anything.
  • Say what is accepted in hintLabel. When a file is rejected, set invalid and show a message under the dropzone that says what to upload: "Upload a PDF or DOCX under 10 MB."
  • Every state is the same box, at least 120px tall with its content centred, so the form below does not move as a file goes from chosen to uploaded.
  • Uploading shows a spinner and no percentage, because nothing reports progress.
  • Pass replaceLabel when a new file can take the uploaded one's place, and onRemove when the file can be taken away.
  • Give inputId an id that is unique on the page, and point the field's label at it with htmlFor.