Skip to content
Upload or import from link, light
Light
Upload or import from link, dark
Dark

Every state

  • Upload or import from link, default, light
    Upload or import from link, default, dark

    default

  • Upload or import from link, focus, light
    Upload or import from link, focus, dark

    focus

  • Upload or import from link, link-tab, light
    Upload or import from link, link-tab, dark

    link-tab

  • Upload or import from link, link-error, light
    Upload or import from link, link-error, dark

    link-error

  • Upload or import from link, importing, light
    Upload or import from link, importing, dark

    importing

  • Upload or import from link, done, light
    Upload or import from link, done, dark

    done

  • Upload or import from link, disabled, light
    Upload or import from link, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"source-file"Id of the file input; related ids are built from it.
namestring"source-file"Form field name of the file input.
labelstring"Add a file"The visible label above the tabs.
acceptstring".pdf,.docx,.csv,.png,.jpg"Accepted types, as the file picker takes them. Its extensions also check a link.
acceptLabelstring"PDF, Word, CSV, PNG or JPG"The accepted types in words, for the hint and messages.
maxSizenumber26214400Largest file from the device, in bytes.
defaultTab"device" | "link""device"Which tab is open at the start.
defaultUrlstring–The link in the field at the start.
defaultErrorstring–An error under the link field at the start.
defaultFileFileUploadLinkFile–The file in the row at the start: name, size, source (device or link), host, status (importing or done).
disabledboolean–Disables the tabs, the field and every action.
importUrlFileUploadLinkImport–Your import call (url, { signal }), resolving with { name, size }. The default is a local simulation; a link containing "fail" fails.
onFileChange(file: FileUploadLinkFile | null) => void–Called when the file in the row is added, imported or removed.
classNamestring–Extra classes on the wrapper.

More file uploads

All 12

Preview

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

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