forms contract

FileUpload

Drag-and-drop + click-to-browse file input. With progress and error per file.

Variants

  • dropzone
  • button
  • avatar

Sizes

  • md
  • lg

Example

<FileUpload variant="dropzone" accept="image/*" maxSize={5 * 1024 * 1024} onUpload={handle} multiple />

Usage rule

accept attribute restricts MIME types; reject silently with toast feedback, not a blocking dialog.

The full FileUpload contract has 5 more rules, plus the do-not patterns. Get the full recipe.

Get the FileUpload contract in your project.