Skip to content
Paste or upload, light
Light
Paste or upload, dark
Dark

Every state

  • Paste or upload, default, light
    Paste or upload, default, dark

    default

  • Paste or upload, focus, light
    Paste or upload, focus, dark

    focus

  • Paste or upload, pasted, light
    Paste or upload, pasted, dark

    pasted

  • Paste or upload, uploading, light
    Paste or upload, uploading, dark

    uploading

  • Paste or upload, error, light
    Paste or upload, error, dark

    error

  • Paste or upload, disabled, light
    Paste or upload, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"paste"Id prefix for the hint and error.
namestring"files"Form field name of the file input.
labelstring"Screenshots and files"The visible label above the area.
acceptstring"image/*,.pdf"Allowed types, as in the accept attribute; checked for pasted, picked and dropped files.
hintstring"Images or PDF, up to 10 MB each"A short note on the allowed files.
maxSizenumber10485760The largest file in bytes.
maxFilesnumber6How many files fit.
defaultFilesFileUploadPasteFile[][]Files already in the list: name, size, type, status, progress, error, preview.
pasteTextbooleanfalseAlso turn pasted text into a .txt file.
draggingboolean–Draws the area as if a file is being dragged over it.
upload(file, { onProgress, signal }) => Promise<void>–Sends one file. The default is a local simulation that fails for names containing "fail".
errorstring–A message under the list; marks the area invalid.
disabledboolean–Disables the area and the list buttons.
onFilesChange(files: FileUploadPasteFile[]) => void–Called when files are added, finished, failed or removed.
classNamestring–Extra classes on the wrapper.

More file uploads

All 12
file-upload-07 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans