File Upload

Mobile-first file picker with type validation and multi-file support

import { FileUpload } from "@plexui/ui/components/FileUpload";

Examples

Overview

With files

  • government-id-scan.pdf
    2.1 MB
  • passport-photo.png
    340 KB
  • non-citizen-travel-2026-approved-document.pdf
    1.5 MB

Error state

  • government-id-scan.pdf
    2.1 MB

Disabled

Reference

PropTypeDefaultDescription
variant"compact" | "area""compact"Visual variant — compact button or larger tappable area
labelstringButton label text
descriptionstringHelper text below the icon (area variant only)
acceptstringAccepted file types (e.g. ".pdf,.png,image/*")
multiplebooleanfalseAllow selecting multiple files
maxFilesnumberMaximum number of files. Button disables at limit.
maxSizenumberMaximum file size in bytes
valueFile[]Controlled file list
onValueChange(files: File[]) => voidCallback when files are added or removed
onFileReject(file: File, reason: string) => voidCallback when a file is rejected (wrong type, too large, over limit)
errorMessagestringError message — sets invalid visual state
invalidbooleanfalseInvalid state (auto-set when errorMessage is provided)
disabledbooleanfalseDisable all interactions