All components

INPUTS / COMPONENTS

File upload

Select files with clear boundaries.

Live component6 documented props

About file upload

File Upload enables users to select files from their device and transfer them to a server. It includes functionalities like progress tracking and error handling to ensure a smooth upload experience.

01

Anatomy

Shared parts, named consistently.

  1. 1
    File Upload FieldLabelRequired

    The label of the field.

  2. 2
    File Upload FieldAsterix

    A star to show when required.

  3. 2
    File Upload FieldDropzone/inputRequired

    A clickable dropzone and input.

  4. 4
    File Upload FieldHelper message

    A string below the input to provide additional context about the File Drop. When in an error state, the helper message will turn red.

  5. 1
    File Upload ItemContainerRequired

    The container of the item.

  6. 2
    File Upload ItemTitleRequired

    The title of the file. This will popular automatically.

  7. 3
    File Upload ItemSubtitleRequired

    The size of the file will be displayed automatically.

  8. 4
    File Upload ItemProgressRequired

    While the file is being uploaded, the Progress component will show the upload progress. It will disappear when it reaches 100%.

  9. 5
    File Upload ItemIcon ButtonRequired

    An Icon Button to remove the item.

  10. 6
    File Upload ItemError messageRequired

    A message to be displayed when there is an error.

Try the default

A working example with the shared V1 visual language.

Drop files here, or browse.svg · .png · .jpg · .jpeg · .pdf · Up to 10 MB each

Files stay in this browser. This example does not upload them.

When to use

Offer file browsing alongside drag and drop. Validate size and type, show errors, and let people remove files before uploading.

The native file chooser and every remove button are keyboard accessible. Dragging is optional.

Related components

Source & adaptation

V1 semantic colors, DM Sans typography, compact controls, and responsive layouts. The API table describes this implementation; source design notes may use earlier API terminology.

components/library/inputs.tsx