Skip to content
Compact attach, light
Light
Compact attach, dark
Dark

Every state

  • Compact attach, default, light
    Compact attach, default, dark

    default

  • Compact attach, focus, light
    Compact attach, focus, dark

    focus

  • Compact attach, attached, light
    Compact attach, attached, dark

    attached

  • Compact attach, uploading, light
    Compact attach, uploading, dark

    uploading

  • Compact attach, error, light
    Compact attach, error, dark

    error

  • Compact attach, disabled, light
    Compact attach, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"attach"Id prefix for the hint and error.
namestring"attachments"Form field name of the file input.
labelstring"Attach files"The button text.
acceptstring".pdf,.doc,.docx,image/*"Allowed types, as in the accept attribute; checked before upload.
hintstring"PDF, Word or image, up to 10 MB"A short note on the allowed files, beside the count.
maxSizenumber10485760The largest file in bytes.
maxFilesnumber5How many files can be attached.
defaultFilesFileUploadAttachFile[][]Files already attached: name, size, type, status, progress, error.
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 row; marks the button invalid.
disabledboolean–Disables the button and the chips.
onFilesChange(files: FileUploadAttachFile[]) => void–Called when files are added, finished, failed or removed.
classNamestring–Extra classes on the wrapper.

More file uploads

All 12
file-upload-01 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