Skip to content

FileUpload

A drop zone with a browse button; files reach the host via upload, listed back in files.

Group: Inputs · Kind: native · in the lite catalog

example
Drop files here
disabled · true
Drop files here

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-file-upload on Web
exponential-ui-file-upload on iOS
exponential-ui-file-upload on Android
exponential-ui-file-upload on Desktop
Prop Type Required Bindable Description
label string – – The field label.
name string yes – The field’s key in the submitted data.
accept string – – Accepted types, comma-separated (image/*,.pdf).
multiple boolean – – Allows more than one file. Default false.
maxSize number – – Max bytes per file; bigger ones are refused.
files [file] – yes The attached files, each removable.
hint string – – Text under the drop zone’s title.
disabled boolean – – Shows it inert. Default false.
  • on.upload: runs an action
  • on.remove: runs an action

None.

none

No basic catalog component maps here.

A native component: every renderer paints it directly.

Role: button

button (the drop zone) + a list of files with remove buttons

Keys Action
Enter Space on the drop zone open the file picker
– Tab reaches each file’s remove button

Recipe parts: FileUpload/root FileUpload/label FileUpload/dropzone FileUpload/icon FileUpload/hint FileUpload/file FileUpload/fileName FileUpload/fileMeta FileUpload/remove FileUpload/description FileUpload/error FileUpload/title FileUpload/browse FileUpload/fileIcon

Keyed by: multiple disabled :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Form · FieldGroup · FormActions · Input · Textarea · NumberField · Checkbox · Radio