Components / Inputs

FileUpload nativelite

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

Children
none
Loading the renderer…
FileUpload rendered by the React renderer on Web
Web React
FileUpload rendered by the SwiftUI renderer on iOS
iOS SwiftUI
FileUpload rendered by the Compose renderer on Android
Android Compose
FileUpload rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-file-upload, painted by each native renderer.

disabled
PropTypeDefaultDescription
labelstring–The field label.
namerequiredstring–The field's key in the submitted data.
acceptstring–Accepted types, comma-separated (image/*,.pdf).
multiplebooleanfalseAllows more than one file.
maxSizenumber–Max bytes per file; bigger ones are refused.
filesbind[file]–The attached files, each removable.
hintstring–Text under the drop zone's title.
disabledbooleanfalseShows it inert.
NameKind
on.uploadevent: runs an action
on.removeevent: runs an action
Role
button
Semantics
button (the drop zone) + a list of files with remove buttons
KeysAction
EnterSpace on the drop zoneopen the file picker
–Tab reaches each file's remove button
Recipe parts
FileUpload/rootFileUpload/labelFileUpload/dropzoneFileUpload/iconFileUpload/hintFileUpload/fileFileUpload/fileNameFileUpload/fileMetaFileUpload/removeFileUpload/descriptionFileUpload/errorFileUpload/titleFileUpload/browseFileUpload/fileIcon
Keyed by
multipledisabled:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover

Themes · Write a theme